<?php
include "ChatConfig.php";
include_once "jdf.php";
$body = str_replace('\n', "", $_POST["body"]);
$body2 = str_replace('"{', "{", $body);
  $query = $connection->prepare("INSERT INTO answer(username,examUID,bodyAns,time,number) VALUES (:username,:examUID,:bodyAns,:time,:number)");
                        $query->bindParam("username", $_POST["username"], PDO::PARAM_STR);
                        $query->bindParam("examUID", $_POST["uid"], PDO::PARAM_STR);
                        $query->bindParam("bodyAns", stripslashes(str_replace('}"', "}", $body2)), PDO::PARAM_STR);
                        $query->bindParam("time", jdate("H:i:s, j F Y"), PDO::PARAM_STR);
                        $query->bindParam("number", $_POST["number"], PDO::PARAM_STR);
            $query->execute();