I a web application that I am developing (being developed in PHP) when a user posts any request for service the user has to fill in a very length form.

Once user fills in the form and submits it another page (confirmation page) is loaded in which all values filled in by user are show. I must point out that at this stage the data is not saved to MySQL yet. Now on this page the user can either save the service request or go back. 

My problem starts here. When the user goes back. All data filled in is lost. BTW User tend to use Browsers Back button instead of the back button provided on the confirmation page.

How can is persist data filled in by user so that user can edit/make changes to data and again submit changed data.


Question: How to replace jquery attr rel with id
Answer: For all li elements assoicated with the tabs, change this:

&lt;li class="active" rel="tab2"&gt;&amp;nbsp;&amp;nbsp;Reviews&amp;nbsp;&amp;nbsp;&lt;/li&gt;


to:

&lt;li class="active" data-target="tab2"&gt;&amp;nbsp;&amp;nbsp;Reviews&amp;nbsp;&amp;nbsp;&lt;/li&gt;


And change

var activeTab = $(this).attr("rel");


to:

var activeTab = $(this).data("target");


Note this uses jQuery default behavior in pulling the HTML5 data-* attributes into the dataset for the object.