[thelist] Basic PHP question about: 'Notice: Undefined variable'
Matt McKeon
matt at camadro.com
Thu Aug 10 14:02:56 CDT 2006
Chris Dempsey wrote:
> One of the Clients has asked us about an error on one of the sites they are
> involved with but that we did not write.
>
> It's written in PHP [I only use ASP] and is throwing an error on the page
> which allows users to login to the admin area:
>
> Notice: Undefined variable: PHP_SELF in e:\Websites\xxxx\admin\login.php on
> line 12
>
> The code on line 12 is: $FF_LoginAction = $PHP_SELF;
>
> The rest of the page appears to render correctly showing the login form.
>
> Would I be correct in thinking that this simply means that the variable
> PHP_SELF is undefined in the code? As in is it equivalent to doing this in
> ASP:
>
> <%
> option explicit
>
> varWhatever = "something"
> %>
>
> Or is something more serious wrong with the code?
>
> Thanks,
>
> Chris.
>
>
probably when that script was written register_globals in the php.ini
was turned on, and now its off..
it should be rewritten as $_SERVER['PHP_SELF']
More information about the thelist
mailing list