dewey_witt Posted July 9, 2007 Share Posted July 9, 2007 OK what do i use in the header to go to the last page if the script fails..... I do not what to go forward to the page again but backwards in The local browsers history. Any help? anf can i still echo? Quote Link to comment Share on other sites More sharing options...
Caesar Posted July 9, 2007 Share Posted July 9, 2007 Not really sure what you're asking but: <?php $_SERVER['HTTP_REFERER']; ?> May be what you're looking for. If you want to redirect to it simple store it in another variable and use the header function. Depending on how you want to use it, possibly sessions may come into play. Quote Link to comment Share on other sites More sharing options...
shamilton Posted July 9, 2007 Share Posted July 9, 2007 Sounds like you want to run the script - check if everything went ok - if it did - print whatever - if not - send the user to previous page? Simple enough logic - you can do it with php headers or javascript. Quote Link to comment Share on other sites More sharing options...
chocopi Posted July 9, 2007 Share Posted July 9, 2007 do you mean something like this <a href="javascript:history.back()">Back</a> This has just been googled so it might be wrong ~ Chocopi Quote Link to comment Share on other sites More sharing options...
per1os Posted July 9, 2007 Share Posted July 9, 2007 <?php echo '<script type="text/javascript">window.location = history.go(-1);</script>'; ?> Unsure if my Javascript is correct but that should do it. Quote Link to comment Share on other sites More sharing options...
dewey_witt Posted July 9, 2007 Author Share Posted July 9, 2007 Frost dude your awsome! Exacly what i was looking for. Chocopi was on the right track too thanks for all you help Issue resolved. Quote Link to comment 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.