this is my code so far
function send_email() {
$email = $_POST['signup-email'];
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$to = "[email protected]";
$subject = "Email from
RateMyLife.com"; $body = "Hi ,$firstname $lastname, this is an email from RateMyLife.com"; $headers = "From:[email protected]";
mail($to, $subject, $body, $headers);
exit();
}
$existingSignup = mysql_query("SELECT * FROM signups WHERE signup_email_address='$email'");
if(mysql_num_rows($existingSignup) < 1){
$date = date('Y-m-d');
$time = date('H:i:s');
$password = md5($passwd);
$insertSignup = mysql_query("INSERT INTO signups (signup_email_address, signup_date, signup_time, firstname, lastname, password, year, day, month, gender) VALUES ('$email','$date','$time','$firstname', '$lastname', '$password', '$year', '$day', '$month', '$gender')");
if($insertSignup){ //if insert is successful
send_email();
}
the email is not send...
thanks i cant figure out what is the problem.
mail()function.