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>"; 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> 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. Link to comment https://forums.phpfreaks.com/topic/85167-location/#findComment-434541 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.