fix redirect after comment publish
This commit is contained in:
parent
e5541155bd
commit
33a304cedc
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue