I am building an message board application using Javascript and PHP. When I try to load a php script via Ajax, I get a 500 internal server error. If I load basic text instead of php, the Ajax call works fine and the text is displayed.
Anyone know why the server would have trouble with this?
Here's my php file:
<?php
//Get input from my form
$from = $_POST["guestbook_from"];
$msg = $_POST["guestbook_msg"];
$today = getdate(date("U"));
recordMessage($from,$msg); //external php function, creates database record
//Print some html
echo("<p>");
echo($msg);
echo("</p>");
echo("<h4>");
echo($from);
echo("<br />");
echo("<small>");
echo("posted on ");
echo($today[month]);
echo(" ");
echo($today[mday]);
echo(", ");
echo($today[year]);
echo("</small>");
echo("</h4>");
?>