did you try echoing the value of $id after you have assigned it?
you may find it's because you aren't connected to your database or something
and also, i am assuming that you are using a recent install/verison of PHP,
because $_GET wasn't available until the last few releases.
beau
//
I'm trying to call a script with the ?= after the php script name in
the
URL, but can't seem to pick up the variable to use in my script...
any help would be greatly appreciated :)
I'm calling the script with this url:
http://localhost/Data/test/dbconnect2c.php?id=TestPage
The section of
[mailto:holmes072000;charter.net]
Sent: Thursday, 7 November 2002 1:20 PM
To: 'Gavin Amm'; 'Php-Db (E-mail)'
Subject: RE: [PHP-DB] Warning - newby question -- $_GET
I'm trying to call a script with the ?= after the php script name in
the
URL, but can't seem to pick up the variable to use in my script
Well, first of all, you have to connect to the database.
?php
$db_server = localhost; // Usual server. :P
$db_login = USERNAME;
$db_pass = USERPASS;
mysql_connect($db_server,$db_login,$db_pass);
?
And, its not always nesecary to have to type in $_GET['id'] to
Hi,
For some reason the page worked the 1st few times, now I get the error
message (after making no changes to the code from when it worked...):
(line 5 references the $db = mysql_co... line of code)
Warning: Unknown MySQL Server Host 'mysql.db.*.net.au' (2) in
Make sure DNS is working and mysql.db.*.net.au resolves. Better yet,
use the IP address unless absolutely necessary to use the hostname.
Peter
On Thu, 7 Nov 2002, Gavin Amm wrote:
Hi,
For some reason the page worked the 1st few times, now I get the error
message (after making no