cleme1q Posted February 24, 2010 Share Posted February 24, 2010 Is there a way to take variables that are assigned in one form and pass them to another form, i.e. Can the value of $form1value be passed to form2 so when I click submit, that data is available to be passed to submit_data.php <form name=x method=post> $form1value=mysql_query(xyz); </form> <form name=form2 action=submit_data.php method=post> question? <input type="radio" name="q1" value="Y" /> Yes <input type="radio" name="q1" value="N" /> No <input type="radio" name="q1" value="M" /> I'm not Sure<br><br> <input type="submit"/> Quote Link to comment https://forums.phpfreaks.com/topic/193278-pass-variables-between-forms/ Share on other sites More sharing options...
waynew Posted February 24, 2010 Share Posted February 24, 2010 You can use a hidden field. Although I'd suggest that you use session variables as that would stop anyone from tampering with your forms. Quote Link to comment https://forums.phpfreaks.com/topic/193278-pass-variables-between-forms/#findComment-1017728 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.