diff --git a/public/API/newComment.php b/public/API/newComment.php index 1d63270..ab8d298 100644 --- a/public/API/newComment.php +++ b/public/API/newComment.php @@ -30,7 +30,7 @@ if($responseData->success) { $sql = "INSERT INTO comments (name, email, comment, article) VALUES ('$name', '$email', '$comment', '$article')"; if ($conn->query($sql) === TRUE) { - header("Location: $ref"); + header("Location: " . $_SERVER["HTTP_REFERER"]); } else { echo "Error: " . $sql . "
" . $conn->error; }