shadiadiph Posted January 9, 2009 Share Posted January 9, 2009 is there a history back function that does not use javascript? Link to comment https://forums.phpfreaks.com/topic/140157-history-back/ Share on other sites More sharing options...
premiso Posted January 9, 2009 Share Posted January 9, 2009 You can store the history in sessions then use the header tag when the user presses the back button, but this would have to postback to the server, so an extra step. But yes it is possible sortof. The first view of the page PHP will not be able to send back unless you use $_SERVER['HTTP_REFERER'], which can be invalid data. EDIT: Yea I probably meant that. Link to comment https://forums.phpfreaks.com/topic/140157-history-back/#findComment-733374 Share on other sites More sharing options...
dennismonsewicz Posted January 9, 2009 Share Posted January 9, 2009 You can store the history in sessions then use the header tag when the user presses the back button, but this would have to postback to the server, so an extra step. But yes it is possible sortof. The first view of the page PHP will not be able to send back unless you use $_SERVER['REFERRER'], which can be invalid data. Don't you mean $_SERVER['HTTP_REFERER']? Link to comment https://forums.phpfreaks.com/topic/140157-history-back/#findComment-733379 Share on other sites More sharing options...
DarkSuperHero Posted January 9, 2009 Share Posted January 9, 2009 <?php $back = '<a href="'. $_SERVER['HTTP_REFERER'] .'">BACK</a>'; echo $back; but like premiso said..it can be invalid data....maybe you can filter out invalid links.... Link to comment https://forums.phpfreaks.com/topic/140157-history-back/#findComment-733383 Share on other sites More sharing options...
shadiadiph Posted January 10, 2009 Author Share Posted January 10, 2009 thanks for the help guys Link to comment https://forums.phpfreaks.com/topic/140157-history-back/#findComment-734035 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.