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 38 39 40 41 42 43 44 45
|
<!DOCTYPE html>
<?php
require_once('../phpLib/dbConn.php');
require_once('../phpLib/gamesTraderSQL.php');
@session_start();
var_dump($_POST); //affiche un tableau vide
$presentLoginPage = true;
$email = (isset($_POST['email'])) ? $_POST['email'] : '';
$password = (isset($_POST['password'])) ? $_POST['password'] : '';
if($email !== '' && $password !== ''){
$presentLoginPage = false;
}
if($presentLoginPage == false){
if(loginCheck($email, $password) == true){
$_SESSION['user']=$email;
header("Location: home.php");
}else{
echo('bad');
}
}
?>
<html>
<head>
<title>New To Me Games</title>
</head>
<body>
New To Me Games
<form method="POST" action="./index.php">
Email Address: <input type="text" name="email" />
<br/>
Password: <input type="password" name="password" />
<br/>
<input type="submit" value="Login"/>
<br/>
</form>
<a href="registration.php">Create Account</a>
</body>
</html> |
Partager