Index.php
    $password = hash('sha256', $pass); // password hashing using SHA256
     $res=mysql_query("SELECT * FROM users WHERE userEmail='$email'");
     $row=mysql_fetch_array($res);
     $count = mysql_num_rows($res); // if uname/pass correct it returns                                must be 1 row
     if( $count == 1 && $row['userPass']==$password ) {
     $_SESSION['user'] = $row['userId'];
     $_SESSION['location'] = $row['userLocation'];
    header("Location: home.php");
   } else {
    $errMSG = "Incorrect Login";
   }
Home.php
 $query = "SELECT * FROM machines WHERE locatie=".$_SESSION['location']; 
 $result = mysql_query($query);
Why Does this not work??
I can't figure out why the $_SESSION['locatie'] part does not work??
I thought it has the same value as in the other file.
 
     
     
    