php - how to pass values from one page to another on jquery form submit -


I am trying to build a form using php & Jquery, but I have a bit confused as to what to do with the jquery part of it ...

Basically, when the user presents the first form, I direct them to the next step Want to do "form, but I want to preserve values ​​submitted from the first one in the hidden input field ...

If someone can show me how or how to point me to a good tutorial I can do it I appreciate ...

I do not have any php or jquery yet, and this is just a simplified version of HTML markup ...

  / / Before .php & lt; Form name = "form1" method = "post" action = "second.php" & gt; & Lt; Input type = "text" name = "name" value = "" /> Name & lt; Input type = "submit" name = "step1" value = "next" /> & Lt; / Form & gt; //second.php & lt; Form name = "form2" method = "post" action = "process.php" & gt; & Lt; Input type = "hidden" name = "name" value = "{$ _ POST ['name']}" /> & Lt; Input type = "text" name = "message" value = "" /> message & lt; Input type = "submit" name = "step 2" value = "end" /> & Lt; / Form & gt;  

  & lt; Input type = "hidden" name = "name" value = "{$ _ POST ['name']}" />  

should be,

  & lt; Input type = "hidden" name = "name" value = "& lt ;? php echo $ _POST ['name']} ;? & gt;" / & gt;  

And if you want, also sanitize input


Comments

Popular posts from this blog

bytearray - Removing trailing nulls from byte array in C# -

linux - Authenticating GTK app to run with root permissions -

WPF TextBlock Overflow Text to the Left -