larissahn Posted May 29, 2009 Report Share Posted May 29, 2009 Hi, I recently created a simple form for my website, http://www.utilaecology.org/research/lionfish_contact.php the feedback should be sent to my email, but I am not receiving anything. <?php $name = $_REQUEST['name'] ; $email = $_REQUEST['email'] ; $date = $_REQUEST['date'] ; $dive_site = $_REQUEST['dive_site'] ; $depth = $_REQUEST['depth'] ; $additional_information = $_REQUEST['additional_information'] ; if (!isset($_REQUEST['email'])) { header( "Location: http://www.utilaecology.org/contact/response.php" ); } elseif (empty($email) || empty($dive_site)) { header( "Location: http://www.utilaecology.org/contact/response.php" ); } else { mail ( "larissahn@rocketmail.com", "Report Lionfish Sighting Form", "Date: $date\n", "Dive Site Location: $dive_site\n", "Depth: $depth\n", "Additional Information: $additional_information\n", "From: $name <$email>" ) ; header ( "Location: http://www.utilaecology.org/contact/response.php" ) ; } ?> Quote Link to comment Share on other sites More sharing options...
InsiteFX Posted May 29, 2009 Report Share Posted May 29, 2009 Hi larissahn, Here is an article on mail http://www.developer.com/lang/php/article.php/3468701 Enjoy InsiteFX Quote Link to comment Share on other sites More sharing options...
BeeDev Posted May 29, 2009 Report Share Posted May 29, 2009 Too many parameters passed to mail() function. Parameters are separated by comma, however you got like 7 parameters in there. Quote Link to comment Share on other sites More sharing options...
jlhaslip Posted May 29, 2009 Report Share Posted May 29, 2009 (edited) Try this: else { $body = "Date: $date\n", $body .= "Dive Site Location: $dive_site\n", $body .= "Depth: $depth\n", $body .= "Additional Information: $additional_information\n", mail ( "larissahn@rocketmail.com", "Report Lionfish Sighting Form", $body, "From: $name " ) ; http://php.net/mail Edited May 29, 2009 by jlhaslip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.