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
// database connection require_once("../hidden_uploads/fa17_da.php");
$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();
?>
ID | Messages |
---|---|
" date(h:i:s)" | "; echo "".$row['message']." | "; echo "
// form submition That will apeare bellow to be chat boc
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started