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? Link to comment https://forums.phpfreaks.com/topic/279923-how-do-you-_post-2-variables/ Share on other sites More sharing options...
AbraCadaver Posted July 6, 2013 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']; 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 ok buddy i will try that out right away. edit: ok it works, thanks allot. This helps be allot. 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
Archived
This topic is now archived and is closed to further replies.