Updated check.php