Zaktualizuj 'index.php'

This commit is contained in:
Krystian Rzepa 2018-12-28 19:57:43 +00:00
parent 3fd4c84713
commit c26af931e2

View File

@ -45,7 +45,8 @@ if (isset($_GET['wyloguj'])==1)
if (isset($_POST['loguj']))
{
$login = filter($_POST['login']);
$password = filter($_POST['password']);
if (mysql_num_rows(mysql_query("SELECT * FROM `users` WHERE `user_login`='$login' && `user_pass`='$password' && `aktywne`='1'")) > 0)
{
$_SESSION['zalogowany'] = true;
@ -57,7 +58,6 @@ if (isset($_POST['loguj']))
if ($_SESSION['zalogowany']==true)
{
echo "Zalogowano jako <b>".$_SESSION['login']."</b>"; echo '<a href="?wyloguj=1"> [Wyloguj]</a>';
?>
<form method="POST" action="index.php">
@ -100,7 +100,7 @@ if ($_SESSION['zalogowany']==false): ?>
<form method="POST" action="index.php">
<b>Login:</b> <input type="text" name="login"><br>
<b>Hasło:</b> <input type="password" name="password"><br>
<b>Hasło:</b> <input type="password" name="password"><br>
<input type="submit" value="Zaloguj" name="loguj">
</form>