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@email.com"; $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 Quote Link to comment https://forums.phpfreaks.com/topic/289215-contact-form-block/ Share on other sites More sharing options...
Solution mac_gyver Posted June 20, 2014 Solution 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. Quote 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 Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/289215-contact-form-block/#findComment-1482935 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.