y2yang Posted January 26, 2010 Share Posted January 26, 2010 I don't think I did this part correctly: history.go(-1); <? if($session->logged_in){ history.go(-1); } else{ ?> Link to comment https://forums.phpfreaks.com/topic/189854-go-back-one-page/ Share on other sites More sharing options...
anupamsaha Posted January 26, 2010 Share Posted January 26, 2010 history.go(-1) is actually a JavaScript statement, not a PHP statement. Try this: <? if($session->logged_in){ echo ' <script type="text/javascript"> history.go(-1); </script>'; } else{ ?> Hope this will help. Thanks! Link to comment https://forums.phpfreaks.com/topic/189854-go-back-one-page/#findComment-1001871 Share on other sites More sharing options...
y2yang Posted January 26, 2010 Author Share Posted January 26, 2010 Thanks anupamsaha. Works like a charm. I owe you one. Link to comment https://forums.phpfreaks.com/topic/189854-go-back-one-page/#findComment-1001892 Share on other sites More sharing options...
anupamsaha Posted January 26, 2010 Share Posted January 26, 2010 You are welcome. Please do not forget to mark this topic as "solved". Thanks. Link to comment https://forums.phpfreaks.com/topic/189854-go-back-one-page/#findComment-1001895 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.