dannerz Posted July 6, 2013 Share Posted July 6, 2013 <form action="shop1b.php" method="post"> Option number placed here: <input type="text" <input name="unit"> <input type="submit"> </form> This is what I've got so far. I can send 1 variable to the next page, which is "shop1b.php", but I don't know how to send more than one variable to the next page, and if I did send 2 variables, how would I use each of them in php? Quote Link to comment https://forums.phpfreaks.com/topic/279923-how-do-you-_post-2-variables/ Share on other sites More sharing options...
Solution AbraCadaver Posted July 6, 2013 Solution Share Posted July 6, 2013 Add another input with a different name like name="unit2" or whatever, then retrieve them on the next page like: echo "unit is ".$_POST['unit']." and unit2 is ".$_POST['unit2']; Quote Link to comment https://forums.phpfreaks.com/topic/279923-how-do-you-_post-2-variables/#findComment-1439722 Share on other sites More sharing options...
dannerz Posted July 6, 2013 Author Share Posted July 6, 2013 (edited) ok buddy i will try that out right away. edit: ok it works, thanks allot. This helps be allot. Edited July 6, 2013 by dannerz Quote Link to comment https://forums.phpfreaks.com/topic/279923-how-do-you-_post-2-variables/#findComment-1439723 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.