title: php code logic for transferring data from one page to another
body: <p>i made a (php) form, and used php session and post to transfer the form data to another page, which gives the user an option to have a look at the data and if wrong he shall move to the main form.. </p>
  
  <p>now here is what i did </p>
  
  <p>on page1 i made a main form say form1, when user clicks on submit, i saved the data to DB and added that id to a session, and sent that session to next page using the same id 
  on next page i called from db matching the same id and displayed data accordingly.. </p>
  
  <p>now i displayed the data (on the second page) inside a div styled with css, the logic for this second page is giving the user the choice if the data is wrong he can edit, and bottom of this div i added a button with code </p>
  
  <pre><code>&lt;a href="#" class="button3"&gt;Edit&lt;/a&gt; 
  </code></pre>
  
  <p>now my question is this, what shall be next? my target is, if user clicks on this edit button he shall be taken to main form (i.e. page1, form1) and there he shall has the option of editing the data in the same id. How can i achieve this friends? </p>
  
  <p>Also i used </p>
  
  <pre><code>&lt;?php session_start(); ?&gt; 
  </code></pre>
  
  <p>on top of both the pages...</p>