[PHP] Passing of querystrings

2004-02-01 Thread Ryan Francis
Hi,

I am new to php and trying to learn it for some university work.  The
problem I am having is this:

I have read on a webmonkey tutorial that when you call a php file and
name-value querystrings are automatically created into variables in your
script.

I have a example url :  http://localhost/output2.php?id=1
Which I hoped would make a variable, $id, and set the value to 1.  However
it doesnt work, the variable is not created.

Any help would be greatly appreciated.  I have Appache 2.0.48, MySQL 4.0.17,
and PHP 4.3.4


Many Thanks


Ryan Francis

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Passing of querystrings

2004-02-01 Thread Liam
The variable is infact created, but rather than being $id
the variable will be $_GET['id']

because it is part of the $_GET array,
so if  you had output2.php?name=fred

the variable to acsses the word fred would be $_GET['name']

Hope that helps
Liam
- Original Message -
From: Ryan Francis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 01, 2004 6:12 PM
Subject: [PHP] Passing of querystrings


 Hi,

 I am new to php and trying to learn it for some university work.  The
 problem I am having is this:

 I have read on a webmonkey tutorial that when you call a php file and
 name-value querystrings are automatically created into variables in your
 script.

 I have a example url :  http://localhost/output2.php?id=1
 Which I hoped would make a variable, $id, and set the value to 1.  However
 it doesnt work, the variable is not created.

 Any help would be greatly appreciated.  I have Appache 2.0.48, MySQL
4.0.17,
 and PHP 4.3.4


 Many Thanks


 Ryan Francis

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php