Jump to content

[SOLVED] form array with POST


brainstem

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.