Medavidcook Posted June 20, 2014 Share Posted June 20, 2014 Hey Need help i am having a mental block when I fill in the form and click send it sends the form but looks like this Name: , Email: , Subject: , Message: the form data is <?php $name = $_POST['name']; $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['message']; $formContent = "From: $name, \n Email: $email, \n Subject: $subject, \n Message: $message"; $recipient = "[email protected]"; $subject = "Website Request"; $mailheader = "Website \r\n"; mail($recipient, $subject, $formContent, $mailheader); echo "Your message was sent" . " - " . "<a href='index.html' style='text-decoration: none; color: #d03837;'>Return Home</a>"; ?> Anyone with any ideas Link to comment https://forums.phpfreaks.com/topic/289215-contact-form-block/ Share on other sites More sharing options...
mac_gyver Posted June 20, 2014 Share Posted June 20, 2014 you would probably want to start by checking if your form tag has a method='post' attribute and if your form fields have name attributes and with those specific names for values. Link to comment https://forums.phpfreaks.com/topic/289215-contact-form-block/#findComment-1482923 Share on other sites More sharing options...
Medavidcook Posted June 20, 2014 Author Share Posted June 20, 2014 yeh realised that i took the post out of method on the form thanks anyway Link to comment https://forums.phpfreaks.com/topic/289215-contact-form-block/#findComment-1482932 Share on other sites More sharing options...
cyberRobot Posted June 20, 2014 Share Posted June 20, 2014 yeh realised that i took the post out of method on the form Since it sounds like you figured out the issue, I have marked the thread as solved. If you need further assistance, please mark the thread as unsolved...or you can start a new thread if the problem is unrelated to the topic. Link to comment https://forums.phpfreaks.com/topic/289215-contact-form-block/#findComment-1482935 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.