<?php if(isset($_POST["username"]) && isset($_POST["password"])) { if($_POST["username"] == $User && $_POST["password"] == $Pass) { session_register("username"); session_register("password"); header("location:main_system.php"); } else { echo "Incorrect Username or Password"; } } ?>