// getting the notification from the url using GET method if (isset($_GET['status'])) { $success = $_GET['status']; } // registration if (isset($_POST['signupBtn'])) { // deletBtn is the btton on the table $res = registerAgent($_POST); if ($res === true) { $msg = "Registration Completed"; header("location:index.php?status=$msg"); exit(); } else { $errors = $res; var_dump($errors); } } // registration if (isset($_POST['loginBtn'])) { // deletBtn is the btton on the table $res = loginAgent($_POST); if ($res === true) { $msg = "Login Successful"; header("location:agents/index.php?status=$msg"); exit(); } else { $errors = $res; var_dump($errors); } } ?>