fix header redirect not working
This commit is contained in:
parent
0ce82e251d
commit
cdf19a3b6d
4 changed files with 8 additions and 4 deletions
|
@ -1,4 +1,3 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<?php
|
<?php
|
||||||
// Include config file
|
// Include config file
|
||||||
include_once("config.php");
|
include_once("config.php");
|
||||||
|
@ -103,6 +102,7 @@ function display_header($pageTitle) {
|
||||||
$header_displayed = true;
|
$header_displayed = true;
|
||||||
|
|
||||||
printf("
|
printf("
|
||||||
|
<!DOCTYPE html>
|
||||||
<html lang=\"en\">
|
<html lang=\"en\">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">
|
<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">
|
||||||
|
|
|
@ -400,11 +400,12 @@ if(isset($_POST["submit"])) {
|
||||||
|
|
||||||
// Try to send the comment
|
// Try to send the comment
|
||||||
$commentId = send_comment($conn, $blogId, $posterId,
|
$commentId = send_comment($conn, $blogId, $posterId,
|
||||||
$commentContent, $parentId);
|
$commentContent, $parentId);
|
||||||
|
|
||||||
// Redirect to this page with GET
|
// Redirect to this page with GET
|
||||||
header("Location: http://www.zdenekborovec-dev.cz/blog/article?guid=".
|
header("Location: http://www.zdenekborovec-dev.cz/blog/article?blogpost_id=".
|
||||||
$blogId."#comment-".$commentId);
|
$blogId."#comment-".$commentId);
|
||||||
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no ID was entered, display warning and die.
|
// If no ID was entered, display warning and die.
|
||||||
|
|
|
@ -82,7 +82,9 @@ function delete_user($conn, $confirmString) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redirect to this page with GET
|
// Redirect to this page with GET
|
||||||
header(sprintf("Location: %s?success=true", sanitize_input($_SERVER["PHP_SELF"])));
|
header(sprintf("Location: %s?success=true",
|
||||||
|
sanitize_input($_SERVER["PHP_SELF"])));
|
||||||
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST["submit"])) {
|
if (isset($_POST["submit"])) {
|
||||||
|
|
|
@ -96,6 +96,7 @@ if (isset($_POST["submit"])) {
|
||||||
// If login succeeded, go to index
|
// If login succeeded, go to index
|
||||||
if($_SESSION["current_user"] != null) {
|
if($_SESSION["current_user"] != null) {
|
||||||
header("Location: "."http://www.zdenekborovec-dev.cz");
|
header("Location: "."http://www.zdenekborovec-dev.cz");
|
||||||
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue