最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

php - Back button after form submit? - Stack Overflow

matteradmin2PV0评论

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 acplish this in html, php, javascript or jquery? Thanks in advance for any help!

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 acplish this in html, php, javascript or jquery? Thanks in advance for any help!

Share Improve this question asked Nov 17, 2012 at 2:22 luv2codeluv2code 1,2966 gold badges24 silver badges42 bronze badges 1
  • Use the javascript history.back() mand, tied to a button? – Tim Dearborn Commented Nov 17, 2012 at 2:26
Add a ment  | 

4 Answers 4

Reset to default 3

The most secure would be php,

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

JavaScript can be disabled a times :)

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

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

have you try this?

it brings you back to the previously loaded webpage.

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

comment list (0)

  1. No comments so far