mailto form - basic question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lveale
Forum Newbie
Posts: 1
Joined: Tue Dec 08, 2009 3:23 am

mailto form - basic question

Post 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!
synical21
Forum Contributor
Posts: 150
Joined: Tue Jul 28, 2009 8:44 am
Location: London UK

Re: mailto form - basic question

Post 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
Post Reply