dannybrazil Posted March 27, 2008 Share Posted March 27, 2008 hi does anybody knows how can i create a BACK BOTTON in a php code ? thanks Link to comment https://forums.phpfreaks.com/topic/98182-back-botton/ Share on other sites More sharing options...
discomatt Posted March 27, 2008 Share Posted March 27, 2008 Easy way.. javascript. <a href="#" onClick="history.go(-1)">Back</a> <input type=button value="Back" onClick="history.go(-1)"> Complicated way.. use sessions to track current and previous page. Create a link to previous page using echo '<a href="' .$_SESSION['lastPage']. '">Back</a>'; Link to comment https://forums.phpfreaks.com/topic/98182-back-botton/#findComment-502326 Share on other sites More sharing options...
trq Posted March 27, 2008 Share Posted March 27, 2008 Buttons are client side, php is server side. While you can output (a string of) html with php, the two really aren't related. Link to comment https://forums.phpfreaks.com/topic/98182-back-botton/#findComment-502328 Share on other sites More sharing options...
discomatt Posted March 27, 2008 Share Posted March 27, 2008 I don't think the actual button was the problem... rather the the 'back' functionality. Link to comment https://forums.phpfreaks.com/topic/98182-back-botton/#findComment-502331 Share on other sites More sharing options...
dannybrazil Posted March 27, 2008 Author Share Posted March 27, 2008 10x alot Link to comment https://forums.phpfreaks.com/topic/98182-back-botton/#findComment-502335 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.