BigGuy2 Posted September 28, 2010 Posted September 28, 2010 On beres-expert.heliohost.org, Contact page, I have set up a box where someone can write a message and by clicking the button below it, the message should get sent as an e-mail to an e-mail adress, using php mail function. Unfortunately, I receive an error, 500 Internal Server Error. I tested this script on another hosting server and it worked. What can I do to fix this? I await your answer, Thank you Quote
Byron Posted September 28, 2010 Posted September 28, 2010 First you might try checking your Error logs at your cpanel right after you recieve the 500 Error. Second, try posting your script for somebody to debug. Quote
BigGuy2 Posted September 28, 2010 Author Posted September 28, 2010 This is what's written in the error log right after I get the error : [Tue Sep 28 12:38:24 2010] [error] [client 188.24.232.215] File does not exist: /home/bigguy/public_html/500.shtml, referer: http://beres-expert.heliohost.org/contact.php This is the script I use : <?php $from=$_POST['from']; $to='beresimob@yahoo.com'; $subject=$_POST['subject']; $message=$_POST['body']; mail($to, $subject, $message, 'From: '.$from); header('index.php'); ?> The information in the POST array is taken from the form on the Contact page. Quote
Byron Posted September 28, 2010 Posted September 28, 2010 Replace: header('index.php'); With: header("location:index.php"); exit; Quote
BigGuy2 Posted September 28, 2010 Author Posted September 28, 2010 It works now, thank you very much! Quote
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.