<?
require_once 'conn.php';
$user = R::find("users", "email = ?", array($_COOKIE['email']));
if( !$user ){
echo"user not found";
}else{
if( $user->hash==$_COOKIE['hash'] ){
echo"authorized";
}else{
echo"error.<hr>DB Hash: ".$user->hash.'<br>Cookie Hash: '.$_COOKIE['hash'];
}
}
?>