Please enter your e-mail address to receive your Address Book username/password:
";
# set up $mail object
$mail = new mime_mail;
$mail->from = "serrano@holisticwebs.com";
$mail->to = $email;
$mail->subject = "Address Book username/password";
$mail->body = "Hello,
Welcome to our service. For security reasons I have to
password protect the Address Book.
To access the Address Book, you have to send me your
resume attached to your email before I send you your
Address Book username/password.
If you should have problems with our service,
please contact serrano@holisticwebs.com
To visit our site now, click here:
http://www.holisticwebs.com/
Webmaster";
$addStmt = "Insert into $tableName(EMAIL) values('%s')" ;
// Check if all the variables are entered
if (!$email ) {
DisplayErrMsg(" Error: The fields is mandatory") ;
exit() ;
}
// Connect to the Database
if (!($link=mysql_pconnect($hostName, $userName, $password))) {
DisplayErrMsg(sprintf("error connecting to host %s, by user %s",
$hostName, $userName)) ;
exit() ;
}
// Select the Database
if (!mysql_select_db($databaseName, $link)) {
DisplayErrMsg(sprintf("Error in selecting %s database", $databaseName)) ;
DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link), mysql_error($link))) ;
exit() ;
}
// Execute the Statement
if (!mysql_query(sprintf($addStmt,$email), $link)) {
DisplayErrMsg(sprintf("Error in executing %s stmt", $stmt)) ;
DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link), mysql_error($link))) ;
exit() ;
}
# send e-mail
$mail->send();
print "I've sent off the e-mail.";
?>