Re: Including Check box ifo in PHP mail
| From: | Chirantan Ghosh | Date: | Fri, 29 Jul 2005 14:42:33 +0000 |
| Subject: | Re: Including Check box ifo in PHP mail | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-219603@lists.php.net to get a copy of this message | ||
Hi Everybody,
The reference PHP is http://www.primarywave.com/BrokerOutpost_Contact.php.
I want it have Checkbox like http://www.primarywave.com/BrokerOutpost_Contact.htm & have it sent vis POST form action like the PHP sited before.
My ignorace is getting the best of me do help please.
The PHP code that I have ( Form post method Printing info in email part)
=================================================
<?
foreach($HTTP_GET_VARS as $indx => $value) {
${$indx}=$value;
}
foreach($HTTP_POST_VARS as $indx => $value) {
${$indx}=$value;
}
if($sendmessage == "yes"){
$todaytime = date("F j, Y, g:i a");
$mailTo = "cghosh@primarywave.com";
//////////////This is where I want it to be mailed when form is submitted
$mailSubject = "Primary Wave Media Contact BrokerOutpost Ref :: $todaytime";
$mailBody = "Information:\n\n";
if($number){
$mailBody .= "Number: $number\n\n";}
$mailBody .= "Full Name: $name\n";$mailBody .= "Company: $company\n";
$mailBody .= "State: $state\n"; $mailBody .= "Email: $email\n"; $mailBody .= "Phone: $phone\n\n";$mailBody .= "Main Activities: $activities\n\n"; /////////////////////////This is where I want to add the Check box like( http://www.primarywave.com/BrokerOutpost_Contact.htm ) $mailBody .= "SelectedNumber: $SelectedNumber\n"; $mailBody .= "Comments: $comments\n\n\n"; $mailBody .= "$todaytime"; $mailHeaders = "From: contact@primarywavemedia.com\n"; mail($mailTo, $mailSubject, $mailBody, $mailHeaders); print "<CENTER><H2>Thank You</H2></CENTER>"; }else{ $_num = new number(); $_num->init(); $number = $_num->num_info[number]; ?> ================================================== I tried putting in labeled Checkbox & included the names in $mailBody .= "CheckBox name: $CheckBoxname\n"; I tried the NAME, LABLE all same to avoid confusion Thanks a lot, C