|
}else{
$emailAddress = stripslashes(strip_tags($_POST['wwEmail']));
$phone = stripslashes(strip_tags($_POST['wwPhone']));
$subject = stripslashes(strip_tags($_POST['wwSubject']));
$comments = stripslashes(strip_tags($_POST['wwComments']));
$bodyText = "";
/* bypassing storing to database for now
$link_id = db_connect();
$line = "";
if(!$link_id) die(sql_error());
else {
}
// save to email_requests table in case email gets lost
$query = "INSERT INTO email_requests VALUES(" .
"'" . strip_tags($emailAddress) . "'," .
"'" . strip_tags($phone) . "'," .
"'" . strip_tags($subject) . "'," .
"'" . strip_tags($comments) . "'," .
"NULL)";
//errormsg($query);
$result = mysql_query($query) or die("Query failed : " . mysql_error());
*/
$bodyText .= "Email Address: " . $emailAddress . "\n\n";
$bodyText .= "Phone #: " . $phone . "\n\n";
$bodyText .= "Subject: " . $subject . "\n\n\n";
$bodyText .= "Comments: \n\n";
$bodyText .= $comments . "\n\n";
// send email
if(mail("webpulse_request@webpulse.com", $subject, $bodyText, "From: requests@webpulse.com")){
echo "success";
}else{ ;
echo "email failed";
}
}
?> |