Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 18th, 2006, 01:14 PM
Registered User
Join Date: Jul 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default going back to original page in php

Hi, I'm trying to go back to the previous webpage using php....like when you click on the Back button in the browser, it takes you to the previous page and the contents that you enter are retained.

 I tried <a href.....> but this only shows the link to the page and not the stuff the user enters. I want a way out of this.

Let me be clear....I want the user to be redirected to the previous page, where the stuff he enters is still visible. It's like filling out a form or something, where the browser redirects you if you enter something wrong, deletes only those fields which are wrong but retains all the correct ones.

I hope someone can help me. Let me know if you don't understand my problem.

Old July 18th, 2006, 03:33 PM
Friend of Wrox
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts

If you are trying to add a link that goes back to the previous page, try something like this...

<A HREF="javascript:history.go(-1)">
<IMG SRC="YourGraphicHere.jpg" 
There are other ways to do this to, if you want to include it in your PHP code.



Old July 18th, 2006, 05:03 PM
Registered User
Join Date: Jul 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks a lot! I was stuck on this for so long.

Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the right back end database for PHP? charliemears PHP Databases 1 May 21st, 2008 03:44 PM
Original form SaveAs new doc w/o original VBA ChuckTremain Word VBA 0 February 8th, 2007 02:58 PM
Login page back to original page pablohoney Classic ASP Basics 1 October 3rd, 2006 07:09 PM
go back previous page hosefo81 PHP How-To 2 February 11th, 2004 01:50 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.