Michan Posted April 8, 2008 Share Posted April 8, 2008 Hi, I have user-created fields that are displayed in a form and have different names (defined by ID). I can print the data sent by $_POST with a print_r($_POST), but how would I actually use it? For example, if a selection menu with the name "myuniquetext" returned "abc", how would I echo "For myuniquetext, you typed abc"? Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted April 8, 2008 Share Posted April 8, 2008 try <?php foreach($_POST as $key => $val){ echo "For $key, you typed $val<br />\n"; } ?> Quote Link to comment Share on other sites More sharing options...
Michan Posted April 8, 2008 Author Share Posted April 8, 2008 You have just saved me. Thanks a bunch! Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted April 8, 2008 Share Posted April 8, 2008 you're welcome Quote Link to comment 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.