Avatar of breeze351
breeze351

asked on 

Emulate back button on browser

I need to emulate the back button on the browser.  I have 4 different php pages that go the same page.  All 4 pages are passed different form data.  How do I do this with a button?
HTMLPHP

Avatar of undefined
Last Comment
breeze351
Avatar of kevinhigg
kevinhigg

With JavaScript, you can do this with history.back() or history.go(-1):

http://www.w3schools.com/jsref/met_his_back.asp

Is this what you're looking for?  Best of luck.
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Why not code the link you want right into the HTML?  You can use PHP to generate the anchor tags.
Avatar of breeze351
breeze351

ASKER

Thanks. Java works.
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of breeze351
breeze351

ASKER

Yes I know. Just trying to save key strokes
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo