connect_error) { http_response_code(505); } $sql = "INSERT INTO reports (hash, url) VALUES ('$hash', '$url')"; if ($conn->query($sql) === TRUE) { http_response_code(200); } else { http_response_code(500); } $conn->close(); } else { http_response_code(505); } ?>