Ok this is an e-card. They fill out the boxes and it previews the card in its final state. If they are happy they hit the send. I am having trouble getting the message to attach to the send form (third form).
The first form is filled out
if($view=="yes"){
echo ("<tr>
<td width=273><div align=center><img src=images/ec_easter.jpg width=276 height=430 class=bdr></div></td>
<td width=377 align=left valign=top><form name=form1 method=post >
<table width=100% border=0 cellspacing=1 cellpadding=1>
<tr>
<td>Your Name </td>
</tr>
<tr>
<td><input name=yName type=text id=yName></td>
</tr>
<tr>
<td>Your Email Address</td>
</tr>
<tr>
<td><input name=yAddress type=text id=yAddress></td>
</tr>
<tr>
<td>Name of Recipient</td>
</tr>
<tr>
<td><input name=recipient type=text id=recipient></td>
</tr>
<tr>
<td>Email address of Recipient </td>
</tr>
<tr>
<td><input name=rEmail type=text id=rEmail></td>
</tr>
<tr>
<td>Type your message here </td>
</tr>
<tr>
<td><textarea name=message cols=40 rows=6 id=message></textarea></td>
</tr>
<tr>
<td><input type=Submit name=Submit value=Submit></td>
</tr>
</table>
</form>");
}
Passes to another form to preview the information and have the option to send.
if($Submit=="Submit"){
echo ("
//problem variable message
<input type=hidden
name=newmessage value=" . $message . ">
<input type=hidden name=from value=" . $yName . ">
<input type=hidden name=fromemail value=" . $yAddress . ">
<input type=hidden name=sendto value=" . $recipient . ">
<input type=hidden name=sendemail value=" . $rEmail . ">
<table width=650 height=390 border=0 cellpadding=0 cellspacing=0 bordercolor=#000000 class=bdr align=center>
<tr>
<td width=371 align=left valign=top><table width=100% height=390 border=0 cellpadding=0 cellspacing=0>
<tr>
<td height=131 align=left valign=top><img src=/australia_zoo/aboutus/images/ec_easter_03a.jpg width=371 height=131></td>
</tr>
<tr bordercolor=#000000 class=bdr>
<td height=200 align=left valign=top background=images/ec_easter_03b.jpg class=indentcontent><h3>From: " . $yName . "</h3>
<br>
" . $newmessage . "</td>
</tr>
<tr>
<td height=80 valign=bottom><table width=99% height=84 border=0 cellpadding=4 cellspacing=0 align=right>
<tr class=bdrwhite>
<td width=55% rowspan=4 align=center valign=middle bgcolor=#B5B38C class=bdrwhite>Australia Zoo<br>
Conservation through <br>
exciting education </td>
<td width=45% bgcolor=#B5B38C class=bdrwhite><a href=http://www.australiazoo.com.au>[url]www.australiazoo.com.au[/url]</a></td>
</tr>
<tr>
<td bgcolor=#B5B38C class=bdrwhite><a href=http://www.australiazoo.com.au/australia_zoo/index.html?url=http://www.australiazoo.com.au/australia_zoo/adopt_an_animal/index.html>Adopt an Animal </a></td>
</tr>
<tr>
<td bgcolor=#B5B38C class=bdrwhite><a href=http://www.crocodilehunter.com/cart/category34_1.htm>Buy Tickets Online</a> </td>
</tr>
<tr>
<td bgcolor=#B5B38C class=bdrwhite><a href=http://www.australiazoo.com.au/australia_zoo/index.html?url=http://www.australiazoo.com.au/australia_zoo/our_amazing_animals_new/index.html>Amazing Animals</a> </td>
</tr>
</table></td>
</tr>
</table></td>
<td width=279 align=right valign=bottom><img src=images/ec_easter.jpg width=276 height=430></td>
</tr>
</table><br><input type=Submit name=Submit value=Send>
");
}
Third form processed to send to an email address
if($Submit=="Send"){
$email = $sendemail;
$subject = "Australia Zoo E-Card";
$body = "
<style type=text/css>
<!--
.bdr {
border: 1px solid #333333;
}
.bdrwhite {
border: 1px solid #ffffff;
}
tr {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: normal;
color: #003300;
}
head {
font-size: 22px;
font-weight: bold;
color: #003300;
}
.indentcontent {
margin-left: 25px;
padding-left: 25px;
}
a:link {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
color: #000000;
}
a:hover {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
color: #000000;
}
a:visited {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
color: #000000;
}
a:active {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
color: #000000;
}
-->
</style>
<table width=650 height=390 border=0 cellpadding=0 cellspacing=0 bordercolor=#000000 class=bdr>
<tr>
<td width=371 align=left valign=top><table width=100% height=390 border=0 cellpadding=0 cellspacing=0>
<tr>
<td height=131 align=left valign=top><img src=http://www.australiazoo.com.au/australia_zoo/aboutus/images/ec_easter_03a.jpg width=371 height=131></td>
</tr>
<tr bordercolor=#000000 class=bdr>
<td height=200 align=left valign=top background=http://www.australiazoo.com.au/australia_zoo/aboutus/images/ec_easter_03b.jpg class=indentcontent><h3>From: " . $from . "</h3>
<br>
" . $newmessage . "</td>
</tr>
<tr>
<td height=80 valign=bottom><table width=99% height=84 border=0 cellpadding=4 cellspacing=0 align=right>
<tr class=bdrwhite>
<td width=55% rowspan=4 align=center valign=middle bgcolor=#B5B38C class=bdrwhite>Australia Zoo<br>
Conservation through <br>
exciting education </td>
<td width=45% bgcolor=#B5B38C class=bdrwhite><a href=http://www.australiazoo.com.au>[url]www.australiazoo.com.au[/url]</a></td>
</tr>
<tr>
<td bgcolor=#B5B38C class=bdrwhite><a href=http://www.australiazoo.com.au/australia_zoo/index.html?url=http://www.australiazoo.com.au/australia_zoo/adopt_an_animal/index.html>Adopt an Animal </a></td>
</tr>
<tr>
<td bgcolor=#B5B38C class=bdrwhite><a href=http://www.crocodilehunter.com/cart/category34_1.htm>Buy Tickets Online</a> </td>
</tr>
<tr>
<td bgcolor=#B5B38C class=bdrwhite><a href=http://www.australiazoo.com.au/australia_zoo/index.html?url=http://www.australiazoo.com.au/australia_zoo/our_amazing_animals_new/index.html>Amazing Animals</a> </td>
</tr>
</table></td>
</tr>
</table></td>
<td width=279 align=right valign=bottom><img src=http://www.australiazoo.com.au/australia_zoo/aboutus/images/ec_easter.jpg width=276 height=430></td>
</tr>
</table>";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: [email]email@email.com[/email]\r\n"; // i added a '\r' here, that might be the problem
if (mail($email, $subject, $body, $headers)) {
echo "Your E-card has been sent";
}
else {
echo "The email has failed!";
}
Its alot of code....sorry and there is something funny going on with URL coding but ignore that as everything here works 100%. I just lose the textarea information of the message variable.