At 15:28 10.11.2002, Ray Seals said:
--------------------[snip]--------------------
>Parse error: parse error, expecting 'T_STRNG' or 'T_VARIABLE' or
>'T_NUM_STRING' in <blah, blah, blah> on line 33.
>
>Here is the script that is doing this:
>
> [...]
>
> $sql = "SELECT *
> FROM users
> WHERE username='$_SERVER["PHP_AUTH_USER"]' and
>password='$_SERVER["PHP_AUTH_PW"]'";
--------------------[snip]--------------------
You need to put the array dereference in curly brackets:
$sql = "SELECT *
FROM users
WHERE username='{$_SERVER['PHP_AUTH_USER']}' and
password='{$_SERVER['PHP_AUTH_PW']}'";
Note that I used single quotes within the array - it's for the paranoid
like me only, it's a few nanosecs faster :)
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php