--- Frank Keessen <[EMAIL PROTECTED]> wrote:
> 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'

I could not tell if your question had been adequately
answered, but there is an easy way to deal with these types
of things without worrying yourself with syntax. Just use
concatenation (.) as follows:

$query = "select newsheadline, news, contact from news
where newsid = '" . $_GET['id'] . "'";

This builds $query using three separate strings. The first
and third strings are double quoted, and the middle string
is your variable. Note another difference is that the value
of $_GET['id'] is going to be surrounded by single quotes
once $query is constructed.

Chris

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

Reply via email to