01: <?php
02: session_start();
03: $entered_Id = $_POST['identifiant'];
04: $entered_Password = $_POST['password'];
05: $saved_Name = "S�bastien";
06: $saved_Id="Seblor";
07: $saved_Password="pwd";
08:
09: if ($entered_Id == $saved_Id && $entered_Password==$saved_Password)
10: {
11: $_SESSION['loggedin'] ="YES";
12: $_SESSION['name'] ="S�bastien";
13: $url="Location : bienvenue.php";
14: header($url);
15: exit;
16: }
17:
18: $problem= "";
19: if ($entered_Id==$saved_Id && $entered_Password != $saved_Password)
20: $problem= "invalidPassword" ;
21:
22: if($entered_Id != $saved_Id)
23: $problem ="invalidUser";
24:
25: $url="Location : index.php?problem=$problem";
26: header($url);
27: exit;
28: ?>