Results 1 to 2 of 2
Thread: PHP form mail send automatically
-
05-21-2008, 02:43 AM #1Junior Guru
- Join Date
- Apr 2005
- Posts
- 232
PHP form mail send automatically
hi, i have a form which send automatically, how can i fix it ,please, here is my code
Code:<? $name=$_POST['name']; $phone=$_POST['phone']; $email=$_POST['email']; $comments=$_POST['comments']; $to="ozchinese@hotmail.com"; $message="$name just filled in your comments form. Phone number is: $phone, They said:\n$comments\n\nTheir e-mail address was: $email"; if(mail($to,"Comments From Your http://www.aimrealty.com.au",$message,"From: $email\n")) { echo "Thanks for your comments."; } else { echo "There was a problem sending the mail. Please check that you filled in the form correctly."; } ?>
http://www.aimrealty.com.au/contact.php
-
05-22-2008, 05:08 PM #2Junior Guru Wannabe
- Join Date
- Mar 2007
- Location
- UK
- Posts
- 89
Hello,
I just tried it, and got a "Thanks for your comments" message.
In what way is it broken? You don't get the email? Please provide some more details.
Or is it working now?
Incidentally, I would put the "Thankyou for your comments" message at the top of the response page, and in a more prominent font size.
When I submitted the form I assumed that something had gone wrong because the thank you message was below the fold.
Do you need to reshow the contact form again following a successful send?
Just my 2c.