Page 1 of 1

mailto form - basic question

Posted: Tue Dec 08, 2009 3:30 am
by lveale
Hi there
I'm pretty new to php, and am trying to implement a simple form on a contact page. However, although I have several fields for 'name', 'phone number', 'organisation' etc the only content included in the email is the senders email and the text entered in the 'message' field.
I've tried various different code and stripped it right back to this:

<?php
$email = $_REQUEST['email'] ;
$organisation = $_REQUEST['organisation'] ;
$name = $_REQUEST['name'] ;
$phone = $_REQUEST['phone'] ;
$details = $_REQUEST['details'] ;

mail( "L_veale@hotmail.com", "Feedback Form Results",
$details, "From: $email" );
header( "Location: http://www.tfcr.org.uk/contactthanks.php" );
?>

I'm presuming it's the parameters in the 'mail' section that need to be changed to include $name, $phone etc but I've tried adding them in with commas seperating them and it doesn't work.
Any help would be greatly appreciated
thanks!

Re: mailto form - basic question

Posted: Tue Dec 08, 2009 11:06 am
by synical21
Try adding a parameter:

Code: Select all

 
mail( "L_veale@hotmail.com", "Feedback Form Results",
$details, "-f".$email);
 
Adding this parameter has helped me in the past. Dont know if it will help you but their are no other suggestions so you can try it for now :D