RobScotland Posted June 12, 2007 Share Posted June 12, 2007 Hi. I have a form on a small site I have..It has been working for over a month with no problems at all. Why would it stop working. Is it possible that my code was in some way changed. This has kept me awake most of the night. I just cant work it out. any help would be most welcome Thanks Rob <?php $email = "mymailaddress"; $subject = "Contact Form"; $message = "\name: ".$_POST['name']; $message .= "\nEmail Adress: ".$_POST['email']; $message .= "\nTelephone: ".$_POST['telephone']; $message .= "\nday: ".$_POST['day']; $message .= "\nmonth: ".$_POST['month']; $message .= "\nyear: ".$_POST['year']; $message .= "\nnights: ".$_POST['nights']; $message .= "\nrooms: ".$_POST['rooms']; $message .= "\npersons: ".$_POST['persons']; $message .= "\nmessage: ".$_POST['message']; $message = addslashes($message); mail($email, $subject, $message); header( "Location: http://www.mywebsite" ); ?> Quote Link to comment https://forums.phpfreaks.com/topic/55186-form-working-well-but-now-nothing/ Share on other sites More sharing options...
Psycho Posted June 12, 2007 Share Posted June 12, 2007 And, what is not working? Are you getting errors or something? Details please. Are you not getting the email messages? If so, it could be a problem of the email being blocked. Try an alternative email address for debugging. Quote Link to comment https://forums.phpfreaks.com/topic/55186-form-working-well-but-now-nothing/#findComment-272814 Share on other sites More sharing options...
suma237 Posted June 12, 2007 Share Posted June 12, 2007 Hi, Please check this <?php $email = "mymailaddress"; $subject = "Contact Form"; $message = "\name: ".$_POST['name']; $message .= "\nEmail Adress: ".$_POST['email']; $message .= "\nTelephone: ".$_POST['telephone']; $message .= "\nday: ".$_POST['day']; $message .= "\nmonth: ".$_POST['month']; $message .= "\nyear: ".$_POST['year']; $message .= "\nnights: ".$_POST['nights']; $message .= "\nrooms: ".$_POST['rooms']; $message .= "\npersons: ".$_POST['persons']; $message .= "\nmessage: ".$_POST['message']; $message = addslashes($message); $ok=mail($email, $subject, $message); if($ok==1){ header( "Location: http://www.mywebsite" );} else{ echo"application could not sent .Error try again"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/55186-form-working-well-but-now-nothing/#findComment-272968 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.