Slideshow
Uživatelské jméno:
Heslo:
Přihlášen jako:
query("INSERT INTO user (username, password) VALUES (\"" . $safe_uname . "\",\"" . $hashed_pass ."\")"); login($safe_uname); } else { $res = $database -> query("SELECT username, password FROM user WHERE BINARY username=\"" . $safe_uname . "\" AND BINARY password = \"" . $hashed_pass . "\""); if ($res -> num_rows == 1) { login($safe_uname); } else { echo ""; } } } if (isset($_POST["logout_button"])) { unset($_SESSION["username"]); echo ""; } function login($uname) { if ($uname != null) { $_SESSION["username"] = $uname; } else { $uname = $_SESSION["username"]; } echo ""; } ?>