brainstem Posted May 23, 2007 Share Posted May 23, 2007 I have a form that passes all data to a processing file that basically says :: If your a field with a value, print the key, and print the value, pack it together and send it in an email. However, for some reason I can't get it to step through a checkbox array. I know this is gonna be easy, so plz be nice. Im just so busy I cant think too hard on this atm. ANY HELP IS APPRECIATED. Here is the main processing code: <?php foreach ( $_POST as $key => $value ) { if ($key != "allpass" && $key != "reqs" && $key != "send") { if (is_array($key)) { foreach ($key as $keyval) { $dcinput .= "<tr><td><strong>".$key.":</strong> </td><td>".$keyval."</td></tr>"; } } else { $dcinput .= "<tr><td><strong>".$key.":</strong> </td><td>".$value."</td></tr>"; } } } ?> Link to comment https://forums.phpfreaks.com/topic/52661-solved-form-array-with-post/ Share on other sites More sharing options...
Barand Posted May 23, 2007 Share Posted May 23, 2007 It's the value that will be the array if (is_array($value)) Link to comment https://forums.phpfreaks.com/topic/52661-solved-form-array-with-post/#findComment-260051 Share on other sites More sharing options...
brainstem Posted May 23, 2007 Author Share Posted May 23, 2007 Thanks man. Link to comment https://forums.phpfreaks.com/topic/52661-solved-form-array-with-post/#findComment-260075 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.