473,387 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

read out data from $_GET - but no name

Just wondering...

would it be possible to read this out:

test.php?444
test.php?test=444

the latter one is correct, but how can I read out a string with no
name?

/S

Mar 17 '07 #1
4 1698
On Sat, 17 Mar 2007 06:52:32 -0700, jodleren wrote:
Just wondering...

would it be possible to read this out:

test.php?444
test.php?test=444

the latter one is correct, but how can I read out a string with no
name?

/S
Something like this:

<?php
foreach ($_GET as $key =$val) {
echo $key;
}
?>

If you just provide ?444 it will take the 444 as the key with an empty
value.

Regards,
Jensen
Mar 17 '07 #2
jodleren wrote:
test.php?444
test.php?test=444

the latter one is correct, but how can I read out a string with no
name?
$_SERVER['QUERY_STRING']

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Mar 19 '07 #3
On Mar 19, 1:18 pm, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
jodleren wrote:
test.php?444
test.php?test=444
the latter one is correct, but how can I read out a string with no
name?

$_SERVER['QUERY_STRING']
Thanks.

To change the topic a bit - is this a good idea?
What do the community think of this way of doing it?

BR
Sonnich

Mar 20 '07 #4
jodleren wrote:
On Mar 19, 1:18 pm, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
>jodleren wrote:
>>test.php?444
test.php?test=444
the latter one is correct, but how can I read out a string with no
name?
$_SERVER['QUERY_STRING']

Thanks.

To change the topic a bit - is this a good idea?
What do the community think of this way of doing it?

BR
Sonnich
Personally, I don't think it's a good idea. But it's not my site.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Mar 20 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: smilemaster | last post by:
I have recently started experiencing form data loss. Here is an example: ====test_form1.php==== <form method="POST" action="test_form2.php"> <input name="textboxvalue" type="text" size="20">...
4
by: Kevin | last post by:
I am having problems in my php code. I am relatively new to php but I know some basics. This is the problem: when i try to echo some information that is typed into form back to the screen i...
1
by: dawnunder | last post by:
eg. Someone fills out 3 fields. (There will be more but this is just to give you an idea) 1. Country? 2. State? 3. City I want this script to generate a web page and list the people by
7
by: bass-man | last post by:
I am trying to include a dynamically changeable file in my website with PHP and Javascript so I am using a hidden field to hold the name of the file I want to include, and I am using the$_GET...
4
by: Mikko | last post by:
Is it possible to read "label" from form-field? <label for="product1">bread</label> <input id="product1" name="product1" type="text" size="3"> number comes with $_GET; but how do I read the...
2
by: tina.boroff | last post by:
I didn't know what to use as a title for this. Here is the scenario: I have a op.reqedit.php page. This page a form where you input data. In this page I have split a MySQL field. It is called...
4
by: Bryan | last post by:
Hello all, Can anyone tell me why the following code isn't working? $dbh = mysql_connect($host,$user,$pass) or die("Couldn't connect..."); $selected = mysql_select_db($db,$dbh); $name =...
1
by: sujithegr8 | last post by:
HIii... Its me sujith i've done something with AJAX. but for the rest i need someo ones help.. i've done half the work. there are two tables. "ajax1" and "ajax2" (check db.sql)
1
by: Van Dugall | last post by:
Hello I have been writing a game in javascript which works fine but I wanted to step it up and request the data of the game from the server. I haven't really used php...all I know is from the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.