-----Original Message-----
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']"";
-----Original Message-----

Any time you end up with two " characters together is a pretty good
indication of where you problem is.

You might try this:

$query = "SELECT * FROM news WHERE ID = '" . $_get['id'] . "'";

Alternately, and depending on what you're doing and why, it might be
more effective to do this:

$idstring = $_get['id'];
$query = "SELECT * FROM news WHERE ID = '$idstring'";

Your choice...

CYA, Dave



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

Reply via email to