fix redirect after comment publish

This commit is contained in:
Jonas Leder 2021-11-09 12:28:04 +01:00
parent e5541155bd
commit 33a304cedc

View file

@ -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;
}