diff options
Diffstat (limited to 'www/functions.php')
| -rw-r--r-- | www/functions.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/www/functions.php b/www/functions.php index be4a8bc..134c0b0 100644 --- a/www/functions.php +++ b/www/functions.php @@ -1,9 +1,9 @@ <? -/* --LOGIN-- */ - require_once("select_function.php"); +/* --LOGIN-- */ + function login($db){ if($_SERVER['REQUEST_METHOD'] == 'POST') { @@ -59,16 +59,16 @@ function login($db){ if($_SESSION["login"]){ header("Refresh: 0; /"); } else { - foreach ($_GET as $argument => $value) { +/* foreach ($_GET as $argument => $value) { if(preg_match("/success/",$argument)) $logout="Log out was succesfull!"; } if($logout){ - echo $logout; + header("Refresh: 0; login?reason=logout&username=" . $unsafe_username); } -/* echo "<form method='post' action='/login'> + echo "<form method='post' action='/login'> <p>Name: <input type='text' name='username'></p> <p>Password: <input type='password' name='password'> <p><input type='submit' name='submit' value='login'></p> @@ -85,7 +85,7 @@ function login($db){ function logout(){ session_destroy(); - header("Refresh: 0; /login?success"); + header("Refresh: 0; login?reason=logout&username=" . $unsafe_username); exit; } |
