Hi everyone, this is basically my first php script, and Im trying to set up a contact form on my website, so that people can message me with queries, reported bugs etc. However when the submit button is clicked, there are php warnings listed. For all i know these could have simple solutions, which is why i need you genius's! Here are the errors that appear: And here is the code thats giving the errors: (warnings) <?php $yourname = $_REQUEST['yourname'] ; $youremail = $_REQUEST['youremail'] ; $yourmessage = $_REQUEST['yourmessage'] ; if (!isset($_REQUEST['youremail'])) { header( "Location: http://www.mydomain.com/contact.html" ); } elseif (empty($youremail) || empty($yourmessage)) { header( "Location: http://www.mydomain.com/error.html" ); } else { mail( "myemail@mydomain.co.uk", "Feedback Form Results", $yourmessage, "From: $yourname <$youremail>" ); header( "Location: http://www.mydomain.com/thankyou.html" ); } ?> Code (markup): Im guessing you would need more information to help me here, if you do, please ask and i'l provide it thanks for your time
NO further info needed. Your host has disabled your mail function by default, and by the looks of it you need to upgrade in order to be able to use it The second error is due to the first being output before you redirect
Oh cool thanks, Well at the moment I'm using a free hosting site, with no mail system, so i can see why now. Is there a way i can bypass this and still have mail sent to me from my website? or do i need to go back with a host that provides an email. btw, you do mean my website host, not my email host? (there different for me)
I mean the host that is supplying you hosting space to make the php script. Yes you will need to either purchase the mail functionality off your hosting company or get a new one (They're very cheap these days)