Lyleyboy Posted January 20, 2009 Share Posted January 20, 2009 Hi all, I am fairly sure there is a way to do this but not certain. How can I detect the data sent via $_POST if I am not sure what the field names will be? The concept is that I'll have a lot of checkboxes with various names and I need to see what has been clicked. The names of the checkboxes will not be the same twice. Thanks Link to comment https://forums.phpfreaks.com/topic/141578-php-form-data/ Share on other sites More sharing options...
jeremywesselman Posted January 20, 2009 Share Posted January 20, 2009 You need to put all of the checkboxes into their own array. <input type="checkbox" name="checkbox[]" value="value" /> Then when you submit the form, it will make an array inside of the $_POST array. $_POST['checkbox'] Note: I didn't test this exact code, but it should be something very similar. Jeremy Link to comment https://forums.phpfreaks.com/topic/141578-php-form-data/#findComment-741084 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.