$message = ""; if(isset($_POST["submit"]) && !isset($_POST["checkbox"])) { $message = "Check the box."; } else { header("location:nextpage.php"); } ?>