Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. if (mysqli_num_rows($result) > 0) {
  2.     // output data of each row
  3.     while($row = mysqli_fetch_assoc($result)) {
  4.         if($row["Dept_Code"]==$myusername && $row["password"]==$mypassword)
  5.         {
  6.             $check=1;
  7.             $_SESSION["dept"] = $myusername;
  8.              header('Location: http://co-project.lboro.ac.uk/crew01/Test2.php');
  9.         }
  10.     }
  11. } else {
  12.     echo "0 results";
  13. }
  14. $_SESSION["successLogin"] = $check; //store result in session variable
  15. if ($check=0)
  16.     {header("location:error.php");}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement