[program-l] php checkbox code

  • From: "Bryan Schulz" <b.schulz@xxxxxxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Wed, 10 Oct 2012 16:04:19 -0500

hi,

how do you confirm checkbox choices from a form and post them to a generated email?

form code:
<tr><td>I would like more information about:</td> <td>&nbsp;</td><td>&nbsp;</td></tr> <tr><td><input type="checkbox" id="adcomtrain" name="adcomtrain" value="no" tabindex="1"> Adaptive computer training</td> <td>&nbsp;</td><td>&nbsp;</td></tr> <tr><td><input type="checkbox" id="blindskills" name="blindskills" value="no" tabindex="1"> Accomplish tasks without vision</td> <td>&nbsp;</td><td>&nbsp;</td></tr>

php code:
   $adcomtrain = $_POST["adcomtrain"];
   $blindskills = $_POST["blindskills"];

email buffer:
$info = "I would like more information about:\n";
if ($adcomtrain=="yes") $info .= "Adaptive computer training \n";
if ($blindskills=="yes") $info .= "Accomplish tasks without vision \n";

Bryan Schulz

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: