$check = $_POST['checkbox'] if($check){ header("location: index.php"); }else{ header("location: access_denied.php?err=Restring"); }