luv2code
luv2code

Reputation: 1296

Back button after form submit?

I have looked everywhere and found nothing. I am not sure if it is possible, but I need a back button after a form has been posted in html. It is a hotel search and the client does not want the parameters set as GET. Does anyone have any idea how I can accomplish this in html, php, javascript or jquery? Thanks in advance for any help!

Upvotes: 2

Views: 2893

Answers (4)

Leon Armstrong
Leon Armstrong

Reputation: 1303

have you try this?

it brings you back to the previously loaded webpage.

<A HREF="javascript:javascript:history.go(-1)">Back</A>

Upvotes: 1

user115422
user115422

Reputation: 4710

The most secure would be php,

<a href="<?php echo $_SERVER['HTTP_REFERER'];?>">back</a>

JavaScript can be disabled a times :)

Upvotes: 3

samayo
samayo

Reputation: 16495

You should use : $_SERVER['HTTP_REFERER'] in your page, or create a session.

Upvotes: 1

John Kurlak
John Kurlak

Reputation: 6680

Just make the button change the location of the window to the location of the form.

Upvotes: 1

Related Questions