Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

// 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Bachelors degree in Information Systems or Statistics

Answered: 1 week ago