}
else {
if(!$form[email]) {
$form[email] = "n/a"; }
if(!$form[subject]) {
$form[subject] = "n/a"; }
/* check if a HTML-mail should be send or a plain/text mail */
if($html_mail == "yes") {
mail( "$admin_name <$admin_mail>", " CCC Free Sample Registration",
"
$form[firstname] $form[lastname] ($form[email]) wrote the following message in the guestbook :
| |
|
| Name: | $form[firstname] $form[lastname] |
| Country: |
$form[country] |
| Referal Source: |
$form[referal] |
| Email: |
$form[email] |
| keywords: |
$form[keywords] |
","From: $form[firstname] $form[lastname] <$form[email]>\nReply-To: $form[firstname] $form[lastname] <$form[email]>\nContent-type: text/html\nX-Mailer: PHP/" . phpversion());
}
else {
mail( "$admin_mail", "CCC Free Sample Registration", "$form[firstname] $form[lastname] ($form[email]) registered to view the Sample e-cookbook: \n\n Name: $form[firstname] $form[lastname] \n Country: $form[country] \n Referal Source: $form[referal] \n Email: $form[email] \n Keywords: $form[keywords] \n ", "From: $form[firstname] $form[lastname] <$form[email]>\nReply-To: $form[firstname] $form[lastname] <$form[email]>\nContent-type: text/plain\nX-Mailer: PHP/" . phpversion());
}
$query = "INSERT INTO $table VALUES('','$form[firstname]','$form[lastname]','$form[country]','$form[referal]','$form[email]','$form[keywords]')";
$result = MYSQL_QUERY($query);
?>
}
}
/* if there's no action given, then we must show the add page */
else { ?>