freshteh Posted January 9, 2008 Share Posted January 9, 2008 What is $php_self in this code? echo "<a href=" . $PHP_SELF. "?start=" . ($start - 10) . ">Previous</a><BR>"; Quote Link to comment https://forums.phpfreaks.com/topic/85167-location/ Share on other sites More sharing options...
Ken2k7 Posted January 9, 2008 Share Posted January 9, 2008 What is $php_self in this code? echo "<a href=" . $PHP_SELF. "?start=" . ($start - 10) . ">Previous</a><BR>"; <a href=" . $_SERVER['PHP_SELF']. "?start=" . ($start - 10) . ">Previous</a><BR> Quote Link to comment https://forums.phpfreaks.com/topic/85167-location/#findComment-434517 Share on other sites More sharing options...
trq Posted January 9, 2008 Share Posted January 9, 2008 It is the name of the current script, but as ken pointed out it is now depricated in favour of $_SERVER['PHP_SELF']. I'll also pont out it is simply not needed within a link. echo "<a href='?start=" . ($start - 10) . "'>Previous</a><br /> is sufficient. Quote Link to comment https://forums.phpfreaks.com/topic/85167-location/#findComment-434541 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.