xposure Posted March 25, 2008 Share Posted March 25, 2008 I have set up a email form and the getintouch.php sript is in the same directory. I have just changed web hosts and now the form does not work. The form used to work with my previous host. the form is at: http://www.xposureinteractive.co.uk/contactus.html Can you help? The script I am using is below: <? /****************************************/ /* phpMyFormmail 1.1 */ /* © 2003 Manuel M-M */ /* Released under GNU-Public-Licence */ /****************************************/ # Before you start configuring the system it`s recommend to read "install.txt" # Your suggestions, and so, are welcome. # So send me these. Problems, errors, ... are also welcome. # If you`ve problems with the script, send me a mail. /* CONFIGURATION START */ /****************************************/ /* Enter your Domain... you can also enter $SERVER_NAME if that`s working too!? */ $allowed_domain = "xposureinteractive.co.uk"; /* Here you can define the starting text of the email */ $start = "The form with the subject $subject has been submitted from xposureinteractive.co.uk\n\n"; /* This is the start text of your email */ /* Now enter the way you post the form... (You can enter POST or GET) - POST HAS GOT MORE SECURITY!!! */ $vartype = "POST"; /* Show the user`s all errors (no php) - "true" :YES, "false" :NO */ $show_errors = true; /* CONFIGURATION END */ /****************************************/ /* Do not edit the following codes... */ $recipient_mail = explode("@",$recipient); $recipient_domain = $recipient_mail[1]; if ((!$recipient == "") && (!$redirect == "") && (!$subject == "") && (!$recipient_domain == "$allowed_domain")) { $error = "In the formular where you entered your data is an error, because the webmaster forgot to<br> create the hidden fields <i>recipient,redirect or subject.</i>"; } else { $line = "0"; $vartype = strtolower($vartype); if ($vartype == "get") { foreach ($HTTP_GET_VARS as $name => $value) { if (!$line) { $line = "$name - $value\n"; $line++; } else { $inhal .= "$name - $value\n"; $line++; } } } else { foreach ($HTTP_POST_VARS as $name => $value) { if (!$line) { $line = "$name - $value\n"; $line++; } else { $inhal .= "$name - $value\n"; $line++; } } } if ($headers == "") { $headers = ""; } $headers .= "From: <contact_us@$allowed_domain>\r\n"; $headers .= "X-Mailer: phpMyFormmail 1.1"; $recipientt = $recipient; $msg = $start; $msg .= $inhal; if ((mail($recipientt, $subject, $msg, $headers)) && ($error == "")) { header("location: $redirect"); } else { if ($error == "") { $error = "There was an error while trying to send email"; } } } if ($show_errors) { echo $error; die(); } ?> Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted March 25, 2008 Share Posted March 25, 2008 not work is very generic can u be more specific? does it blow up you computer when u try and use it? does it bake cookies? what is not work? Quote Link to comment Share on other sites More sharing options...
xposure Posted March 25, 2008 Author Share Posted March 25, 2008 Hi, When you submit the form it send you to the error page saying "There was an error while trying to send email" Thanks D Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted March 25, 2008 Share Posted March 25, 2008 well in your code i dont see $redirect getting established and you are saying to display the error if $error is empty.... Quote Link to comment 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.