Zaktualizuj 'index.php'

This commit is contained in:
Krystian Rzepa 2018-12-30 16:26:18 +00:00
parent 35c799f373
commit ff997c0200

View File

@ -1,6 +1,10 @@
<?php
session_start();
?>
<link rel="stylesheet" type="text/css" href="style.css">
<?php
include 'sql/db_login.php';
mysql_connect("$db_servername", "$db_login", "$db_password");
@ -8,12 +12,6 @@ mysql_select_db("$db_name");
$db = mysqli_connect("$db_servername", "$db_login_tasks", "$db_password_tasks", "$db_name_tasks");
?>
<link rel="stylesheet" type="text/css" href="style.css">
<?php
function filter($variable)
{
if(get_magic_quotes_gpc())
@ -112,17 +110,19 @@ if ($_SESSION['zalogowany']==true)
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>
<input type="submit" value="Zaloguj" name="loguj">
</form>
---------------------------------------------------
<form method="POST" action="nowe_konto.php">
<input type="submit" value="Rejestracja nowego konta">
</form>
<div class="loginbox">
<img src="img/avatar.png" class="avatar">
<h1>Zaloguj się</h1>
<form method="POST" action="index.php">
<p>Login</p>
<input type="text" name="login" placeholder="Wpisz swój login" required>
<p>Hasło</p>
<input type="password" name="password" placeholder="Wpisz swoje hasło" required>
<input type="submit" name="loguj" value="Zaloguj">
<a href="nowe_konto.php">Zarejestruj się</a>
</form>
</div>
<?php
endif;