Posted by Shelly on 10/23/07 16:38
"Good Man" <heyho@letsgo.com> wrote in message
news:Xns99D27AEB45331sonicyouth@216.196.97.131...
> "Jeff Gaines" <jgaines_newsid@yahoo.co.uk> wrote in
> news:xn0fcsm06378v50002@news.individual.net:
>
>
>> They don't work as they are but I can get the parameters by using
>> $_GET['id'] or sometimes $_POST['id'].
>>
>> Is this a result of different versions of php (I am using v5) where
>> behaviour has changed or is it something else that is going completely
>> over my head because I am so new to this?
>
>
> It's a change in the way PHP is set up; In PHP 3 (and possibly early
> versions of 4?), "register_globals" was set to "on", which meant that you
> didn't have to specify any variables before hand - they were created when
> you asked for them.
>
> Most PHP installations now have "register_globals" set to Off, and scripts
> like the one you posted will be in trouble unless they're modified like
> you've done above. That kind of script is understandable if written
> before
> 2002, but really is incredibly bad practice created done afterwards.
>
>
> http://ca.php.net/register_globals
Good point! I didn't catch that when I tried to help him. I thought he had
confusion about the mysql call and what the variables were. I misread his
question.
Shelly
[Back to original message]
|