kellyc Posted July 7, 2009 Share Posted July 7, 2009 Hi There, Im trying to create a simple contact form which will email me the data but everytime i fill it in and hit send, i get a '500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.' message. However, the data does reach my inbox! Does anyone know what could be wrong? I contacted my hosting company but they tell me it must be a problem with my coding. I have attached screen shots of my html feedback form and also the php file. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
Stryves Posted July 7, 2009 Share Posted July 7, 2009 I'm guessing it's the redirect after the message is sent. The if($sent) then header: blah blah thankyou.html Quote Link to comment Share on other sites More sharing options...
npsari Posted July 7, 2009 Share Posted July 7, 2009 If I was in your place, I will use the basic of all I will use... if(mail($emaily, $subject, $message, "From: $SITE_EMAIL")){ print"<FONT style=\"font-size:12px\" color=\"#000000\" face=\"Arial\">Sent!</FONT>"; }else{ print"<FONT style=\"font-size:12px\" color=\"#000000\" face=\"Arial\">Not sent!</FONT>"; } Because the Submit form looks ok to me I think the handling code may be the problem Try this simple code which I gave you and see if it works If it doesnt work, perhaps your server does not send emails, or email companies block the emails coming from your server You need to keep trying, I had several problems like that before Quote Link to comment Share on other sites More sharing options...
kellyc Posted July 7, 2009 Author Share Posted July 7, 2009 Thank you for your replies, unfortunately im still getting the same message even after using your piece code. :-\ Hmmm, this is frustrating! 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.