Hey everyone,
I'm having trouble with a simple mail script. I will start with the jQuery which sends a post.
$("#email").click(function () {
var usersemail = $("#user-email").val() ;
$.post("mailform.php", { message: 'feedback', email: 'usersemail' } );
});
});
Next is the php file mailform.php
<?php
//The email of the sender
$email = $_POST['email'];
//The message of the sender
$message = $_POST['message'];
//The subject of the email
$subject = "Fanshawe Student Success";
$extra = $email."\r\nReply-To: ".$email."\r\n";
mail($email,$subject,$message,$extra);
?>
Not sure why this isn't working?
Here is a live version of the App if you would rather test it.
http://philipk.ca/Interactive-survey/index.html
and here is the php page.
http://philipk.ca/Interactive-survey/scripts/mailform.php