Re: Warning - newby question -- $_GET

From: Date: Thu, 07 Nov 2002 03:13:22 +0000
Subject: Re: Warning - newby question -- $_GET
Groups: php.db 
Request: Send a blank email to php-db+get-23072@lists.php.net to get a copy of this message
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 declare a GET variable. Some server software requires it, I think IIS is the only one, its what I use. And its not required for you to use the 2nd prefex for mysql_query() Just as long as you connected to the DB at the beginning of the script, all you need is mysql_query($sql). That should clear up the error. As for you want to with the $result array, ask if needing help.

« previous php.db (#23072) next »