Commit eabedff3 authored by Paarth's avatar Paarth

minor

parent a006484b
......@@ -33,8 +33,7 @@ if(isset($postData) && !empty($postData)){
echo json_encode($msg);
}
else{
$msg = "question already exists";
echo json_encode($msg);
http_response_code(404);
}
}
......
......@@ -12,7 +12,7 @@ $postData = file_get_contents("php://input");
if (isset($postData) && !empty($postData)) {
$request = json_decode($postData,true);
$username = mysqli_real_escape_string($mysqli, trim($request->username));
$bool = trim($request->)
$bool = trim($request->b);
$sql0 = "UPDATE users set n_attempts = n_attempts+1 where username = '$username'";
mysqli_query($mysqli,$sql0);
if($bool){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment