Implement generic redirect helper

This commit is contained in:
Pòsweg 2020-08-29 17:47:28 +02:00
parent 41e2ffeee0
commit 7dec683bc4
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
<?php
include("settings.php");
include("functions.php");
session_start();
$db = new SQLite3('ask.db');
@ -58,6 +60,5 @@ else{
echo("<a href='/login.php'>Login</a>");
}
echo("</div>");
//header("Location: /login.php"); die();
}
?>

View File

@ -200,7 +200,8 @@ if(isset($_GET["p"])){
// Time
$time->settimestamp($current["q_date"]);
echo("\t\t\t\t\t");
echo('<a href="?p=' . $current["id"] . '">');
$_GET["p"] = $current["id"];
echo('<a href="' . redirect("user", $_GET) . '">');
echo("<p class='question-date'>" . $time->format("Y-m-d h:i:s") . "</p>");
echo("</a>\n");