RE: [PHP] Parse Error(Newbie)

From: Date: Mon, 27 May 2002 05:49:50 +0000
Subject: RE: [PHP] Parse Error(Newbie)
Groups: php.general 
Request: Send a blank email to php-general+get-99331@lists.php.net to get a copy of this message
$query = "select * from news WHERE id = "$_get['id']""; you've got quotes within quotes - either change the inner quotes to single quotes, or escape them $query = "select * from news WHERE id = '$_get[id]'"; or $query = "select * from news WHERE id = \"$_get['id']\""; -----Original Message----- From: webmaster@tececo.com [mailto:webmaster@tececo.com] Sent: Monday, May 27, 2002 3:47 PM To: php-general@lists.php.net Subject: [PHP] Parse Error(Newbie) I know it is probably something obvious but the following gives me a parse error and as a newbie I am having trouble locating it. $query = "select * from news WHERE id = "$_get['id']""; JJ Harrison webmaster@tececo.com <mailto:webmaster@tececo.com> www.tececo.com <http://www.tececo.com>

« previous php.general (#99331) next »