Jump to content

Feedback Form


larissahn

Recommended Posts

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" ) ;
 }
?> 

Link to comment
Share on other sites

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 by jlhaslip
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...