Hi, calling all PHP people.
I’m getting http error 500 during email sending from a php script called from my form.
Email works fine.
It seems to be on the exit… or where I call the next page!
Any advice welcome
Cheers
Dan
what’s the code?
Hi,
Its sends the mail fine then bombs after the mail() with;
Server Error 500 – Internal server error There is a problem with the resource you are looking for and it cannot be displayed
Here is the part of the code…
$email_send = mail($email_to, $email_subject, $email_body, $email_headers);
if($email_send) {header(“Location: ”.$goto_after_email);} else {print “We encountered an error sending your email”;}
Thanks
Dan
Just to debug and check to see if the $goto_after_email page is broken (mod_rewrite/apache error?), change that statement to redirect to the index page (or back to the form). That’ll let you know that the page you redirect to after the email is successfully sent is the problem. 
Not sure I understand you. Do you mean change;
header(“Location: ”.$goto_after_email);
to
header(“Location: ”.”some url here”);
Yes. 
Still bombs out? Help!
