Re: Question about $_GET

From: Date: Thu, 16 Jan 2003 07:58:15 +0000
Subject: Re: Question about $_GET
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-131827@lists.php.net to get a copy of this message
Hi, Thanks for the great help! It's working now! The solution: $query = "SELECT Newsheadline, News, Contact FROM news WHERE Newsid = {$_GET['id']}"; Regards, Frank ----- Original Message ----- From: "Rick Emery" <remery@emeryloftus.com> To: "Frank Keessen" <fkeessen@planet.nl>; <php-general@lists.php.net> Sent: Wednesday, January 15, 2003 1:22 PM Subject: Re: [PHP] Question about $_GET > Make life easy for yourself: > > $query = "SELECT Newsheadline, News, Contact FROM news WHERE Newsid = ".$_GET['id']; > ----- Original Message ----- > From: "Frank Keessen" <fkeessen@planet.nl> > To: <php-general@lists.php.net> > Sent: Wednesday, January 15, 2003 4:50 AM > Subject: [PHP] Question about $_GET > > > Hi All, > > Can you please help me with the following problem? I've had code wich was running fine with php till > i've upgraded to PHP version 4.2.3. > > The original code line was: > > $query = "SELECT Newsheadline, News, Contact FROM news WHERE Newsid = '$id'"; > > but it's not working when you have register_globals=Off > So i've read everywhere to use the $_Get: > > So the code looks like this: > > $query = "SELECT Newsheadline, News, Contact FROM news WHERE Newsid = $_GET['id']"; > > But all i'm getting in my browser is: > > parse error, expecting T_STRING' or T_VARIABLE' or > `T_NUM_STRING' > > > Can someone please help? > > Thanks and regards, > > Frank > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#131827) next »