Zaktualizuj 'index.php'
This commit is contained in:
parent
3fd4c84713
commit
c26af931e2
@ -45,7 +45,8 @@ if (isset($_GET['wyloguj'])==1)
|
|||||||
|
|
||||||
if (isset($_POST['loguj']))
|
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)
|
if (mysql_num_rows(mysql_query("SELECT * FROM `users` WHERE `user_login`='$login' && `user_pass`='$password' && `aktywne`='1'")) > 0)
|
||||||
{
|
{
|
||||||
$_SESSION['zalogowany'] = true;
|
$_SESSION['zalogowany'] = true;
|
||||||
@ -57,7 +58,6 @@ if (isset($_POST['loguj']))
|
|||||||
if ($_SESSION['zalogowany']==true)
|
if ($_SESSION['zalogowany']==true)
|
||||||
{
|
{
|
||||||
echo "Zalogowano jako <b>".$_SESSION['login']."</b>"; echo '<a href="?wyloguj=1"> [Wyloguj]</a>';
|
echo "Zalogowano jako <b>".$_SESSION['login']."</b>"; echo '<a href="?wyloguj=1"> [Wyloguj]</a>';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form method="POST" action="index.php">
|
<form method="POST" action="index.php">
|
||||||
@ -100,7 +100,7 @@ if ($_SESSION['zalogowany']==false): ?>
|
|||||||
|
|
||||||
<form method="POST" action="index.php">
|
<form method="POST" action="index.php">
|
||||||
<b>Login:</b> <input type="text" name="login"><br>
|
<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">
|
<input type="submit" value="Zaloguj" name="loguj">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user