[thelist] Basic PHP question about: 'Notice: Undefined variable'

Ann Adamcik daadamcik at yahoo.com
Thu Aug 10 14:06:02 CDT 2006


I think you need this:

$FF_LoginAction = $_SERVER['PHP_SELF'];

See http://us2.php.net/manual/en/reserved.variables.php for more info.

-Ann

----- Original Message ----
From: Chris Dempsey <evolt at cubeit.co.uk>
To: thelist at lists.evolt.org
Sent: Thursday, August 10, 2006 12:35:07 PM
Subject: [thelist] Basic PHP question about: 'Notice: Undefined variable'

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.

-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 







More information about the thelist mailing list