Question: // this code is suppose to creat a simple ajax json chatbox i keep getting a 500 error and dont know why. also any errors

// this code is suppose to creat a simple ajax json chatbox i keep getting a 500 error and dont know why. also any errors found in code will be apreatiated

ajax Lab

$db = new PDO("mysql:host="50.62.209.160";dbname="myhw4";", jmthom1353, jumpingmimi01T); // when submit is hit message is added to the database and via ajox is imideatly shown bellow with a timestamp $select = $db->prepare("SELECT message FROM messages ?"); $select->bindParam(1, $message); $message = $_REQUEST['message']; $select->execute();

?>

fetch(PDO::FETCH_ASSOC)) { echo ""; echo ""; echo ""; echo "";

} ?>

ID Messages
" date(h:i:s)"".$row['message']."
fetchAll(PDO::FETCH_ASSOC); echo json_encode($results); } ?>

// form submition That will apeare bellow to be chat boc

message:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!