Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isset($_POST['login'])){
- $username = $_POST['username'];
- $password = $_POST['password'];
- $pc = md5($password);
- $req = $pdo->prepare('SELECT * FROM users WHERE nom= :username AND pass= :password');
- $req->execute(array(
- 'username' => $username,
- 'password' => $pc,
- ));
- if ($user = $req->fetch()) {
- $_SESSION['auth'] = $user;
- header("location:home.php");
- exit();
- }
- else{
- echo"<script> alert('LE NOM D UTILISATEUR OU LE MOTS DE PASSE INCORRECTE')</script>";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement