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! Link to comment https://forums.phpfreaks.com/topic/100079-using-unknown-_post-data/ 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"; } ?> Link to comment https://forums.phpfreaks.com/topic/100079-using-unknown-_post-data/#findComment-511728 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! Link to comment https://forums.phpfreaks.com/topic/100079-using-unknown-_post-data/#findComment-511729 Share on other sites More sharing options...
Northern Flame Posted April 8, 2008 Share Posted April 8, 2008 you're welcome Link to comment https://forums.phpfreaks.com/topic/100079-using-unknown-_post-data/#findComment-511730 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.