First of all, please check out my other post. http://www.daniweb.com/forums/post1318472.html#post1318472
Ok, hello everybody! I have a question that should be pretty simple.
I have a php page that will send an email. I got that all working fine.
<?php
$to = "reciever@example.com";
$subject = "Test Subject";
$body = "Test Body";
$headers = "From: sender@example.com\r\n" .
"X-Mailer: php";
if (mail($to, $subject, $body, $headers)) {
echo("<p>Message sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>
But what I need to do is make it so when you click that button, it will send the email, and not send it before clicking it. Optionaly, but it isn't necessary would be to change the button's name once it sends it from "send email" to "didn't receive it yet? send it again". Thank you! I would really love some help!
Thanks in advance!
-Keavon