Re: [PHP] Questions on PHP Variables

2002-11-10 Thread Ray Seals
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

Re: [PHP] Questions on PHP Variables

2002-11-10 Thread Rasmus Lerdorf
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

Re: [PHP] Questions on PHP Variables

2002-11-10 Thread Leif K-Brooks
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

Re: [PHP] Questions on PHP Variables

2002-11-10 Thread Ernest E Vogelsinger
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

Re: [PHP] Questions on PHP Variables

2002-11-10 Thread Rasmus Lerdorf
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

Re: [PHP] Questions on PHP Variables

2002-11-08 Thread Marco Tabini
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

Re: [PHP] Questions on PHP Variables

2002-11-08 Thread Justin French
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