Thursday 15 July 2010

forms - PHP mail script gives me syntax error -



forms - PHP mail script gives me syntax error -

im trying php mailer embedded on html page, no syntax errors in dreamweaver sendmail (http://glob.com.au/sendmail/) keeps giving me error message "syntax error in arguments " im hoping can help me nail issue

my php mailer: //email info $admin_email = "------------ secret"; $email = $_request['email']; $subject = $_request['subject']; $comment = $_request['comment']; //send email mail($admin_email, "$subject", $comment, "from:" . $email); //email response echo "thank contacting us!"; } //if "email" variable not filled out, display form else { ?>

here relevant page code

<?php //if "email" variable filled out, send email if (isset($_request['email'])) { //email info $admin_email = "schlichtingr@yahoo.com"; $email = $_request['email']; $subject = $_request['subject']; $comment = $_request['comment']; //send email mail($admin_email, "$subject", $comment, "from:" . $email); //email response echo "thank contacting us!"; } //if "email" variable not filled out, display form else { ?> <html> <head> </head> <body> <div id ="email"> <form method="post"><br /> <h3><b>send message</b></h3> <span>any farther questions or concerns? send email!</span><br> email: <input name="email" type="text" /><br /> subject: <input name="subject" type="text" /><br /> message:<br /> <textarea name="comment" rows="15" cols="40"></textarea><br /> <input type="submit" value="submit" /> </form> </div> <?php } ?>

any help can give me much appreciated new php still trying learn

basically want create mail service form built onto html page

i'm not familiar sendmail, notice 1 thing:

"$subject" needs $subject . capturing variable reason. turning string of "$subject" makes no sense me.

hope helps!

php forms email

No comments:

Post a Comment