php error_reporting E_ALL session_start if empty _POST login empty _PO

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
error_reporting(E_ALL);
session_start();
if (!empty($_POST['login']) && !empty($_POST['password'])){
if ($_POST['login'] == $_SESSION['name'] || $_POST['login'] == $_SESSION['email'] && $_POST['password'] == $_SESSION['password']) {
header("Location:profile.php");
exit();
}
}
?>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<form method="POST">
<p>Login</p>
<input type="text" name="login" maxlength="50" autocomplete="on"">
<p>Password</p>
<input type="text" name="password" minlength="10" maxlength="50" autocomplete="on"">
<input type="submit">
</form>
</body>
</html>