Howdy_McGee Posted May 23, 2011 Share Posted May 23, 2011 So i'm going through a PHP tutorial online (which has been pretty good so far) but I ran across one thing I didn't quite understand and that is what exactly $_SERVER['PHP_SELF'] is. He was using it to reference back to a form on the same page to see if the form had been submitted or not. But I didn't quite understand. Can somebody explain what it is/what is does a little more or send me a few links please? Link to comment Share on other sites More sharing options...
justsomeguy Posted May 23, 2011 Share Posted May 23, 2011 PHP_SELF refers to the URL of the current script. You can use that if you want to point to the same script without needing to type the name. Link to comment Share on other sites More sharing options...
jeffman Posted May 23, 2011 Share Posted May 23, 2011 The reference is here: http://www.php.net/manual/en/reserved.variables.server.phpOr simply execute this:var_dump($_SERVER);and see what prints out. You can learn a lot doing stuff like that. Link to comment Share on other sites More sharing options...
Howdy_McGee Posted May 24, 2011 Author Share Posted May 24, 2011 ah gotcha. Very cool thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.