|
OK before I lose any more hair over this deal I thought I would come and ask the experts. I am trying to send a form and the email address does not come through.
The problem area is in bold
<?php
include "mail2.php";
$recipient = "deleted due to the fact my boss would kill me";
switch ($_POST["frm1"]){
case "classified":
$subject = "New Classified Ad Order";
$headers = "Mime-Version: 1.0\r\nContent-Type: text/plain; charset=\"iso-8859-1\"\r\nContent-Transfer-Encoding: 8bit";
$message = ''.
$_POST["name"].' wants to order a classified ad to appear in the '.$_POST["rdo1"].' issue.
The add '.$_POST["name"].' wants is:
'.$_POST["txt1"].' '.$_POST["txt2"].' '.$_POST["txt3"].' '.$_POST["txt4"].' '.$_POST["txt5"].' '.
$_POST["txt6"].' '.$_POST["txt7"].' '.$_POST["txt8"].' '.$_POST["txt9"].' '.$_POST["txt10"].' '.
$_POST["txt11"].' '.$_POST["txt12"].' '.$_POST["txt13"].' '.$_POST["txt14"].' '.$_POST["txt15"].' '.
$_POST["txt16"].' '.$_POST["txt17"].' '.$_POST["txt18"].' '.$_POST["txt19"].' '.$_POST["txt20"].' '.
$_POST["txt21"].' '.$_POST["txt22"].' '.$_POST["txt23"].' '.$_POST["txt24"].' '.$_POST["txt25"].' '.
$_POST["txt26"].' '.$_POST["txt27"].' '.$_POST["txt28"].' '.$_POST["txt29"].' '.$_POST["txt30"].' '.
$_POST["txt31"].' '.$_POST["txt32"].' '.$_POST["txt33"].' '.$_POST["txt34"].' '.$_POST["txt35"].' '.
$_POST["txt36"].'
The customers information:
Name: '.$_POST["name"].'
Phone Num:'.$_POST["phone_num"].'
Address: '.$_POST["address"].'
City/State/Zip: '.$_POST["cistazip"].'
'.$_POST["name"].'\'s Credit Card Info
'.$_POST["rdo2"].'
Account Number: '.$_POST["accnum"].'
Expiration Date: '.$_POST["expdat"].'
Name as it appears on the card: '.$_POST["fulnam"].'';
break;
case "subscription":
$subject = "Subscription Order";
$headers = "Mime-Version: 1.0\r\nContent-Type: text/plain; charset=\"iso-8859-1\"\r\nContent-Transfer-Encoding: 8bit";
switch ($_POST["rdo1"]){
case "ren_cur":
$subscription = "renew a current subscription.";
break;
case "ren_exp":
$subscription = "renew an expired subscription.";
break;
case "new_sub":
$subscription = "start a new subscription.";
break;
case "one_iss":
$subscription = "order one issue.";
break;
}
$message=''.$_POST["txtNam"].' wants to '.$subscription.'
'.$_POST["txtNam"].'\'s information:
Email Address:'.$_POST["txtEma"].'
Name: '.$_POST["txtNam"].'
Address: '.$_POST["txtAdd"].'
City: '.$_POST["txtCit"].' State: '.$_POST["txtSta"].' Zip: '.$_POST["txtZip"].'
Phone: '.$_POST["txtPho"].' Would like to see articles about: '.$_POST["txtArt"].'
'.$_POST["txtNam"].'\'s credit card information:
'.$_POST["rdo2"].'
Account number: '.$_POST["txtAcc"].'
Expiration Date: '.$_POST["txtExp"].'
Full Name on card: '.$_POST["txtFul"].'';
break;
case "block":
$subject = "New Block Ad Order";
switch($_POST["rdo1"]){
case "fullpage_oneissue":
$block = "a full page add in one issue";
break;
case "fullpage_threeissues":
$block = "a full page add in three issues";
break;
case "fullpage_sixissues":
$block = "a full page add in six issues";
break;
case "fullpage_twelveissues":
$block = "a full page add in twelve issues";
break;
case "fullpage_eighteenissues":
$block = "a full page add in eighteen issues";
break;
case "halfpage_oneissue":
$block = "a half page add in one issue";
break;
case "halfpage_threeissues":
$block = "a half page add in three issues";
break;
case "halfpage_sixissues":
$block = "a half page add in six issues";
break;
case "halfpage_twelveissues":
$block = "a half page add in twelve issues";
break;
case "halfpage_eighteenissues":
$block = "a half page add in eighteen issues";
break;
case "thirdpage_oneissue":
$block = "a third of a page add in one issue";
break;
case "thirdpage_threeissues":
$block = "a third of a page add in three issues";
break;
case "thirdpage_sixissues":
$block = "a third of a page add in six issues";
break;
case "thirdpage_twelveissues":
$block = "a third of a page add in twelve issues";
break;
case "thirdpage_eighteenissues":
$block = "a third of a page add in eighteen issues";
break;
case "quarterpage_oneissue":
$block = "a quarter page add in one issue";
break;
case "quarterpage_threeissues":
$block = "a quarter page add in three issues";
break;
case "quarterpage_sixissues":
$block = "a quarter page add in six issues";
break;
case "quarterpage_twelveissues":
$block = "a quarter page add in twelve issues";
break;
case "quarterpage_eighteenissues":
$block = "a quarter page add in eighteen issues";
break;
case "sixthpage_oneissue":
$block = "a sixth of a page add in one issue";
break;
case "sixthpage_threeissues":
$block = "a sixth of a page add in three issues";
break;
case "sixthpage_sixissues":
$block = "a sixth of a page add in six issues";
break;
case "sixthpage_twelveissues":
$block = "a sixth of a page add in twelve issues";
break;
case "sixthpage_eighteenissues":
$block = "a sixth of a page add in eighteen issues";
break;
case "eighthpage_oneissue":
$block = "an eighth of a page add in one issue";
break;
case "eighthpage_threeissues":
$block = "an eighth of a page add in three issues";
break;
case "eighthpage_sixissues":
$block = "an eighth of a page add in six issues";
break;
case "eighthpage_twelveissues":
$block = "an eighth of a page add in twelve issues";
break;
case "eighthpage_eighteenissues":
$block = "an eighth of a page add in twelve issues";
break;
}
if ($_POST["rdo2"]){
switch ($_POST["rdo2"]){
case "back_cover":
$modifier = "".$_POST["ful_nam"]." would like back cover space.";
break;
case "inside_front_cover":
$modifier = "".$_POST["ful_nam"]." would like inside front cover space.";
break;
case "inside_back_cover":
$modifier = "".$_POST["ful_nam"]." would like inside back cover space.";
break;
}
}
$message = '
'.$_POST["ful_nam"].' wants to place a block ad order.
'.$_POST["ful_nam"].' wants to place '.$block.'.
'.$modifier.'
'.$_POST["ful_nam"].'\'s information is:
'.$_POST["rdo3"].'
Account Number: '.$_POST["acc_num"].'
Expiration Date: '.$_POST["exp_dat"].'
Full name as shown on card: '.$_POST["ful_nam"].'
';
$lb = "\r\n";
$mime_boundary = "_attach_".md5(uniqid(mt_rand(), 1));
$headers.= $lb;
$headers.= "MIME-Version: 1.0".$lb;
$headers.= "Content-Type: multipart/mixed;".$lb;
$headers.= " boundary=\"".$mime_boundary."\"".$lb;
$content = "This is a multi-part message in MIME format.".$lb.$lb;
$content.= "--".$mime_boundary.$lb;
$content.= "Content-Type: text/plain; charset=\"iso-8859-1\"".$lb;
$content.= "Content-Transfer-Encoding: 7bit".$lb.$lb;
$content.= $message.$lb;
$content.= "--".$mime_boundary.$lb;
$data = chunk_split(base64_encode(implode("", file($_FILES["gif_image"]))));
$content.= "Content-Disposition: attachment;".$lb;
$content.= "Content-Type: ".$_FILES["gif_image"]["type"];
$content.= " name=\"".$_FILES["gif_image"]["name"]."\"".$lb;
$content.= "Content-Transfer-Encoding: base64".$lb.$lb;
$content.= $data.$lb;
$content.= "--".$mime_boundary."--";
break;
}
mail($recipient, $subject, $content, $headers);
echo "Your information has been sent.<br>\r\n";
echo "<a href=\"http://www.animalfindersguide.com\">Click here to return to the home page.</a>"
?>
HERE IS THE HTML CODE THAT GOES WITH IT>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Animal Finder's Guide Subscriptions</title>
<style type="text/css">
<!--
.subtype {font-weight:bold; font-size: 12pt;}
#-->
</style>
</head>
<body style="font-size: 12pt;">
<form method="POST" name="subscription" action="./mail.php">
<input type="hidden" name="frm1" value="subscription">
<table width="60%">
<tr><td colspan=
"2"><embed src="header.swf" width="100%"></embed></td></tr>
<tr>
<td>
<img src="animal" alt="animal" title="animal">
</td>
<td>
<table width="100%">
<tr>
<td colspan="2"><div style="font-size: 16pt; font-weight: bolder;" align="center">ORDER BLANK</div></td>
</tr>
<tr>
<td colspan="2" class="subtype">Please check one:
</td>
</tr>
<tr>
<td>
<input type="radio" name="rdo1" value="ren_cur" tabindex="0">
</td>
<td class="subtype">
I am renewing a current subscription
</td>
</tr>
<tr>
<td>
<input type="radio" name="rdo1" value="ren_exp" tabindex="1">
</td>
<td class="subtype">
I am renewing an expired subscription
</td>
</tr>
<tr>
<td>
<input type="radio" name="rdo1" value="new_sub" tabindex="2">
</td>
<td class="subtype">
I am a new subscriber
</td>
</tr>
<tr>
<td>
<input type="radio" name="rdo1" value="one_iss" tabindex="3">
</td>
<td class="subtype">
I am sending $2.50 for a single issue
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<div style="font-size: 12pt;" align="right">Phone: 812-898-2678 Fax: 812-898-2013 Office Hours: 1:00 pm - 5:00 pm</div>
</td>
</tr>
<tr>
<td colspan="2" style="font-size: 10pt;">
Have your friends & business associates subscribe now to AFG. Eighteen issues per year<br>
only $30 in the United States & Puerto Rico. Canada & Mexico subscriptions $33 (US currency).<br>
We accept Mastercard, Visa, check, cash, or money order. PLEASE PRINT CAREFULLY.
</td>
</tr>
<tr>
<td colspan="2">
<table>
<tr>
<td>Email Address</td><td><input type="text" size="60" name="txtEma" tabindex="4"></td>
</tr>
<tr>
<td>Name</td><td><input type="text" size="60" name="txtNam" tabindex="5"></td>
</tr>
<tr>
<td>Address</td><td><input type="text" size="60" name="txtAdd" tabindex="6"></td>
</tr>
<table dwcopytype="CopyTableRow">
</table>
<tr>
<td colspan="2" >
<table>
<tr>
<td>City</td><td><input type="text" name="txtCit" tabindex="7"></td>
<td>State</td><td><input type="text" size="25" name="txtSta" tabindex="8"></td>
<td>Zip</td><td><input type="text" size="29" name="txtZip" tabindex="9"></td>
</tr>
<tr>
<td>Phone</td><td><input type="text" name="txtPho" tabindex="10"></td>
<td colspan="2">I would like to read articles about:</td><td colspan="2"><input type="text" name="txtArt" size="33" tabindex="11"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table>
<tr>
<td colspan="4"><center><b>Credit Card Order</b></center></td><td colspan="2"><center><b>Account Number</b></center>
</td>
</tr>
<tr>
<td><input type="radio" name="rdo2" value="Mastercard" tabindex="11"></td><td><img src="mcard_logo.gif"></td>
<td><input type="radio" name="rdo2" value="Visa" tabindex="12"></td><td><img src="visa_logo.gif"></td>
<td colspan="2"><input type="text" name="txtAcc" size="58" tabindex="13"></td>
</tr>
<tr>
<td colspan="4">Credit Card Expiration Date:</td><td><input type="text" name="txtExp" tabindex="14"></td><td rowspan="3" valign="top"><pre>Mail to:<b> ANIMAL FINDERS' GUIDE<br> P.O.BOX 99<br> PRAIRIE CREEK, INDIANA 47869</b></pre>
</td>
</tr>
<tr><td colspan="4">Card Holder Full Name</td><td><input type="text" name="txtFul" tabindex="15"></td></tr>
</table>
</td>
</tr>
<tr><td colspan="2"><input type="submit" value="Submit Information"> <input type="reset" value="Reset Form"></td></tr>
<tr>
<td colspan="2"><b>This order form and it's contents are encrypted and secure.</b>
</td>
</tr>
<tr><td colspan="2">This order form may be printed and mailed to the address above</td></tr>
</table>
</form>
</body>
</html>
|