diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -3,6 +3,12 @@ include('config.php'); $signout = '<a href="' . basename($_SERVER['PHP_SELF']) . '?signout">Sign out</a>'; +if (isset($_GET) && count($_GET) > 0) { + $getstring = "?" . http_build_query($_GET); +} else { + $getstring = ""; +} + if (isset($_GET['signout'])) { if (isset($_COOKIE['password'])) { unset($_COOKIE['password']); @@ -20,7 +26,7 @@ if ($_POST && $pass) { /* Cookie expires when browser closes */ setcookie('password', hash("sha256", $_POST['password']), false, '/', $_SERVER['SERVER_NAME'] ); } - header('Location: ' . $url); + header('Location: ' . $url . $getstring); } else { header('Location: ' . $url); exit(); @@ -40,7 +46,7 @@ if ($_POST && $pass) { </head> <body> -<form name="form" method="post" action="./"> +<form name="form" method="post" action="./<?php echo $getstring ?>"> <p><input type="password" title="Enter your password" name="password" id="password"> <br><input type="checkbox" name="rememberme" value="rememberme">Remember me</p> <p><input type="submit" name="Submit" value="Login"></p> |