Skip to content
Snippets Groups Projects
Commit 33a304ce authored by Jonas Leder's avatar Jonas Leder
Browse files

fix redirect after comment publish

parent e5541155
No related branches found
No related tags found
No related merge requests found
Pipeline #1642 passed
......@@ -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 . "<br>" . $conn->error;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment