PHP/HTML Email in a script.. Help Please
Posted: Sun Aug 14, 2005 12:08 am
ok i got a form on my website.. when people fill it out and everything it brings them to another page which emails the form to be ... it all works good. however i wanted to know how to make a email that uses php and html in it...
this is the html/php script that needs to be emailed to me..
the mail script is...
where it says EMAIL STUFF HERE i would put the php/html script in.. however it will not work.. howdo i do this?
feyd | please post php code using
this is the html/php script that needs to be emailed to me..
Code: Select all
<html>
<div align="center"><center><table WIDTH="600" BORDER="0">
<tr>
<td ALIGN="center" VALIGN="top" style="border: 1px"><font COLOR="#000000"><b>General
Information</b></font></td>
</tr>
<tr>
<td ALIGN="center" style="border: 1px"><table WIDTH="590" CELLPADDING="2" CELLSPACING="0"
BORDER="0">
<tr>
<td ALIGN="right" VALIGN="bottom"><b><font SIZE="-1">Name:</font></b></td>
<td ALIGN="LEFT" VALIGN="TOP"><font SIZE="-1">$realname</font></td>
</tr>
<tr>
<td ALIGN="right" VALIGN="bottom"><b><font SIZE="-1">Address:</font></b></td>
<td ALIGN="LEFT" VALIGN="TOP"><font SIZE="-1">$address</font></td>
</tr>
<tr>
<td ALIGN="right" VALIGN="bottom"><b><font SIZE="-1">City:</font></b></td>
<td ALIGN="LEFT" VALIGN="TOP"><font SIZE="-1">$City <b>State:</b> $State
<b>ZIP:</b> $Zip</font></td>
</tr>
<tr>
<td ALIGN="right" VALIGN="bottom"><b><font SIZE="-1">County:</font></b></td>
<td ALIGN="LEFT" VALIGN="TOP"><font SIZE="-1">$County <b>Email:</b> $email</font></td>
</tr>
<tr>
<td ALIGN="right" VALIGN="bottom"><b><font SIZE="-1">Residence of:</font></b></td>
<td ALIGN="LEFT" VALIGN="TOP"><font SIZE="-1">$ResidenceOf
If township, enter name</font>$EnterTownship</td>
</tr>
<tr>
<td ALIGN="right" VALIGN="bottom"><b><font SIZE="-1">Phone Day:</font></b></td>
<td ALIGN="LEFT" VALIGN="TOP"><font SIZE="-1">$DayPhone( <b>Night:</b> $NightPhone</font></td>
</tr>
<tr>
<td ALIGN="right" VALIGN="bottom"><b><font SIZE="-1">Date of Birth:</font></b></td>
<td ALIGN="LEFT" VALIGN="TOP"><font SIZE="-1"> $DateOfBirth Do you use tobacco in any form? $TobaccoUse </font></td>
</tr>
<tr>
<td ALIGN="right" VALIGN="bottom"><b><font SIZE="-1">Amount of <br>
Coverage:</font></b></td>
<td ALIGN="LEFT" VALIGN="TOP"><font SIZE="-1"> $AmountOfCoverage </font></td>
</tr>
<tr>
<td ALIGN="right" VALIGN="bottom"><b><font SIZE="-1">Type of <br>
Coverage<br>
Desired?</font></b></td>
<td ALIGN="LEFT" VALIGN="middle"><font SIZE="-1"><div align="left"><p>$TypeOfLife</font></td>
</tr>
<tr>
<td ALIGN="right" VALIGN="bottom"></td>
<td ALIGN="LEFT" VALIGN="TOP"></td>
</tr>
</table>
</td>
</tr>
</table>
</center></div><div align="center"><center><table WIDTH="600" BORDER="0">
<tr>
<td ALIGN="center" VALIGN="top"><font COLOR="#000000"><b>Additional Comments:</b></font></td>
</tr>
<tr>
<td ALIGN="CENTER"><table WIDTH="590" CELLPADDING="2" CELLSPACING="0" BORDER="0">
<tr>
<td ALIGN="center"><table BORDER="0" CELLSPACING="0" width="585">
<tr>
<td ALIGN="center" width="618"><font SIZE="-1">Please give any additional comments about
the coverage you desire:<br>
$comments</font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center></div><div align="center"><center><table BORDER="0" CELLPADDING="5">
<tr>
</tr>
</table>
</center></div></td>
</tr>
</table>
</center></div>
</form>
<p align="center"><strong><i>Thank you for your time in submitting this life insurance
quote form. <br>
</i><em>Please allow 1 day for quotation.</em></strong><br>
</p>
</body>
</html>Code: Select all
<?
mail("nickman013@mac.com,nick@regionalplanning.com,angela@regionalplanning.com",
"Regional Planning Home Quote Submission Form","Submitted Content
EMAIL STUFF HERE!
?>
<html>
<form name="redirect">
<center>
<font face="Arial"><b>You will be redirected in:<br><br>
<form>
<input type="text" size="3" name="redirect2">
</form>
seconds</b></font>
</center>
<script>
<!--
//change below target URL to your own
var targetURL="http://regionalplanning.com"
//change the second to start counting down from
var countdownfrom=5
var currentsecond=document.redirect.redirect2.value=countdownfrom+1
function countredirect(){
if (currentsecond!=1){
currentsecond-=1
document.redirect.redirect2.value=currentsecond
}
else{
window.location=targetURL
return
}
setTimeout("countredirect()",1000)
}
countredirect()
//-->
</script>
</html>feyd | please post php code using
Code: Select all
tags[/color]