-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlog-in.php
37 lines (37 loc) · 1.11 KB
/
log-in.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
if(!isset($_SESSION))
{
session_start();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Logowanie</title>
</head>
<body>
<?php
if(isset($_SESSION['imie'], $_SESSION['nazwisko'], $_SESSION['pseudonim'], $_SESSION['data_dolaczenia'], $_SESSION['id']))
{
header("location: index.php");
}
?>
<form action="index.php" method="post">
<h1>Logowanie</h1>
Psuedonim: <input type="text" name="pseudonim"><br>
Hasło: <input type="password" name="haslo"><br>
<input type="submit" value="Zaloguj się">
<br><br><a style="color: blue" href="sign-up.php">Nie masz konta? Zarejestruj się!</a>
<?php
if(isset($_SESSION['error']))
{
echo "<p style='color: red'>" . $_SESSION['error'] . "</p>";
unset($_SESSION['error']);
}
?>
</form>
</body>
</html>