Location: PHPKode > scripts > Php AddressBook 2 > php-addressbook-2/email.php
<?php
include_once("case.php"); 
include_once("config.php");
include_once("open-db.php"); 

       # setup SQL statement to retrieve link that we want to edit
		$sql  = " SELECT * FROM addressbook WHERE id = $id ";
		
        # execute SQL statement
        $result = mysql_query($sql,$cid);

        # retrieve values
        $row = mysql_fetch_array($result);
			include("rows.php"); 
			
$thankyou = "index.php";
// thank you page

# set date
$thedate = date("Y-m-d");

if($message == ""){
echo "No message address added. Please go back.";
}elseif($subject == ""){
echo "No subject added. Please go back.<br/>";
}else{
//sent message message
$Bmessage = "From: $yourmail\n\nFirst Name: $yourfirst\nLast Name: $yourlast\n\nDate: $thedate\nMessage: $message";

$msg = ereg_replace("\\\'", "'", $Bmessage);

mail($email, $subject, $msg, "From: $yourmail\r\nReply-to: $yourmail\r\n");

?>
<meta http-equiv="refresh" content="0; url=<? echo "index2.php?title=sent"; ?>"">
<?php
}
?>
Return current item: Php AddressBook 2