The fact that tutorials are outdated using old code is not a good reason
to stick with it :)
I agree totally.
So I'm trying to use the $_Server variables but I continue to get this
error:
Parse error: parse error, expecting 'T_STRNG' or 'T_VARIABLE' or
'T_NUM_STRING' in blah, blah, blah on
Don't use quotes around the array index inside a quoted string.
-Rasmus
On 10 Nov 2002, Ray Seals wrote:
The fact that tutorials are outdated using old code is not a good reason
to stick with it :)
I agree totally.
So I'm trying to use the $_Server variables but I continue to get this
Uh, no. That makes it think it's a constant, which generates a notice.
Rasmus Lerdorf wrote:
Don't use quotes around the array index inside a quoted string.
-Rasmus
On 10 Nov 2002, Ray Seals wrote:
The fact that tutorials are outdated using old code is not a good reason
to stick with it
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
Uh, no. Your problem is obvious:
$sql = SELECT *
FROM users
WHERE username='$_SERVER[PHP_AUTH_USER]' and
password='$_SERVER[PHP_AUTH_PW]';
You have double-quotes inside a double-quoted string.
Like I said, don't use quotes around the array index inside a
Try looking in the manual for register_globals. It's a setting in
php.ini that determines whether server variables are registered as
regular variables or not. The material you have probably expects it to
be turned on, whereas in more recent versions it has been turned off.
It's considered a
They contain the same data.
Newer versions of PHP (= 4.1.1 I think) make use of the new superglobal
arrays (like $_POST, $_GET, $_SESSION, $_COOKIE, $_SERVER, etc)... This way
of doing things is more secure, and will encourage smarter programming.
You can get the old behaviour back by changing
7 matches
Mail list logo