Bastien Koert wrote:
On Thu, Oct 28, 2010 at 10:12 AM, Jack <> wrote:
I have a form which has the following: ( quick clip )

 <form id="form1" name="form1" method="post"
action=""; onSubmit="return

               <input name="area_interest" type="checkbox" id="field13"
value="Peer Guide" />
               Peer Guide</label>
             <br />
<input type="submit" value="Submit" />

When the form runs process_form.php it emails the content and has several
other fields from the form, but I have some fields like the one above that
don't show up in the result.  The script that builds the message looks like
the below

$temp_message .= "Area(s) of Interest: ".
$_POST['area_interest'] ."\n";

Is there anything obvious that I am missing?

Is there a way for me to show all the fields from the form, and their field
names which are received by process_form?


Check boxes (assuming you have more than one in the set) are generally
coming in as an array. You can see this by running this

echo "<pre>";
echo "</pre>";

to see the entire post array

+1 for Bastien; print_r() and var_dump() are the keys to debugging.
for a decent overview of same.

And I guess you could reinvent the wheel, or actually process your
POSTed data, with foreach():

// Roll your own print_r()
   foreach ($_POST as $p => $q) {
      echo $p. "-".$q. "<br />";

// Or do_something_useful()
   foreach ($_POST as $p => $q) {


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to