|
Assignment Fifteen |
<?php
$email="profiles.email@cox.net";
$title="This is a Test!!";
$myemail="mysiteemai@cox.net";
#-----------------------------------------------
#subject of the message
$re = "A New Test E-Mail." ;
#set the Content-type header for HTML mail
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html;";
$headers .= "charset=\"iso-8859-1\"\n";
#set the From header
$headers .= "From: $myemail \n";
if ($email=="") $email=$myemail;
#recipient's email address
$to = $email;
$msg = "<b>Attention $email: ".$title."</b><br /><br /><i>Your Test information will be review and will be included, if the whois checks with this e-mail address within 2 days.</i><br /><br />After it has been approved and showsup on our search page, please send us an e-mail if you want to change the Keywords, or Description.<br /><br /><br /><b>Thanks, <br />
<br />The Webmaster</b>";
#send the email now...
#recipient's email address
mail($to,$re,$msg, $headers);
#copy of e-mail to webmaster
#with a different message
$to = $myemail;
$msg = "<b>Attention: ".$email."</b> has been added. <br /><br /><b>".$title." </b> and it has worked OK!<br /><br />";
#send the email now...
#to my email address
mail($to,$re,$msg, $headers);
#-----------------------------------------------
?>
<h1>Your mail has been sent</h1>
$datatosend="<table align=\"center\" cellSpacing=\"0\" cellPadding=\"5\" width=\"100%\" border=\"0\" >
<td align=\"center\" valign=\"top\" width=\"40%\" >
<img width=\"300\" src=\"images/$photo\"
alt=\"$photo\" border=\"2\" hspace=\"3\"><br></td>
<td width=\"60%\" align=\"left\" valign=\"top\" >
<font size=\"+1\"><b>Hello I am $firstname ($lastname not shown)\" !
</b></font><br>
ID: <b>$ID</b><br>
Address1: <b>( $address1 not shown )<b>$ID</b><br>
Address2: <b>( $address2 not shown )<b>$ID</b><br>
Postcode: <b>( $postcode not shown )<b>$ID</b><br>
Phone: <b>( $phone not shown )<b>$ID</b><br>
E-Mail: <b>( $email not shown )<b>$ID</b><br>
City: <b>$city<b>$ID</b><br>
Country: <b>$country<b>$ID</b><br>
Age: <b>b>";
if (date("m")< substr($birthdate,5,2))
{$datatosend .= date("Y-m-d")-$birthdate-1;}
else{$datatosend .= date("Y-m-d")-$birthdate;}
$datatosend .="</b><br>
Birthday: <b>$birthdate<b>$ID</b><br>
Hair Color: <b>$hair<b>$ID</b><br>
Eye Color: <b>$eyes<b>$ID</b><br>
Weigh: <b>".intval($weight*2.2+.5)." lb. or ".intval($weight+.5)." kg.<b>$ID</b><br>";
continue on as required