Re: PhP/MySQL Search Results code
| From: | Curt Zirzow | Date: | Mon, 27 Oct 2003 15:26:38 +0000 |
| Subject: | Re: PhP/MySQL Search Results code | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-167733@lists.php.net to get a copy of this message | ||
* Thus wrote Robb Kerr (rkerr@digitaliguana.com):
>
> I'm always getting an error when testing the page. The error is...
>
> Parse error: parse error, expecting
T_VARIABLE' or
> '$'' in
> /home/s/k/user992816/html/RobesonWeb/TMP4np9nf7zp.php on line 4
>
> The line to which it refers is the line stating,
> "$vManufacturer_rs_RobesonResultsList = (get_magic_quotes_gpc()) ?
> manufacturer : addslashes(manufacturer);"
>
hmm.. what part of line 4? take the php line and put it on 4
different lines
$vManufacturer_rs_RobesonResultsList =
(get_magic_quotes_gpc()) ?
manufacturer :
addslashes(manufacturer);
What line is the error on now? line 6? ah.. so what exacly is
manufacturer? A variable, constant, string or number? I'm going to
make the assumption that it is a variable. So you need to prepend a
$ to the word manufacturer ($manufacturer).
If you test it now, you'll probaly get a notice/warning about line
7 (depending on php's error_reporting level). You'll probably want
to make that manufacturer a variable also.
Curt
--
"My PHP key is worn out"
PHP List stats since 1997:
http://zirzow.dyndns.org/html/mlists/