millsy007 Posted May 20, 2009 Share Posted May 20, 2009 Hi I have some code that sends a form: $name = trim($_GET['name']); //The senders name $email = trim($_GET['email']); //The senders email address $subject = trim($_GET['subject']); //The senders subject $message = trim($_GET['msg']); //The senders message mail($to,$subject,$message,"From: ".$email.""); //a very simple send It works fine but I am trying to make some changes to it but when I do it stops working What I want to do is change the subject of the email to say 'Enquiry' And have the subject text that is passed in be added as part of the message (this will actually hold the users brief summary) Any help would be appreciated as my attempt didnt send the mail. Quote Link to comment https://forums.phpfreaks.com/topic/158999-sending-email-form/ Share on other sites More sharing options...
Maq Posted May 21, 2009 Share Posted May 21, 2009 If I understand you correctly, just change these lines: $subject = "Enquiry"; //The senders subject $message = trim($_GET['msg']) . "\n\r" . trim($_GET['subject']); //The senders message Quote Link to comment https://forums.phpfreaks.com/topic/158999-sending-email-form/#findComment-838562 Share on other sites More sharing options...
millsy007 Posted May 21, 2009 Author Share Posted May 21, 2009 Exactly Thanks Quote Link to comment https://forums.phpfreaks.com/topic/158999-sending-email-form/#findComment-838582 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.