<!DOCTYPE html> <?php session_start(); $myusername = $mypassword = ""; include "data.php"; $msg = ""; $control = new jobs(); if (!empty($_POST['register'])) { //Do all the submission part or storing in DB work and all here header('Location: Signupform.php'); } if (!empty($_POST['login'])) { //Do all the submission part or storing in DB work and all here if ($_SERVER["REQUEST_METHOD"] == "POST") { $myusername = $control->correctInput($control, $_POST['username']); $mypassword = $control->correctInput($control, $_POST['password']); $type = $control->correctInput($control, $_POST['type']); if (!(empty($myusername) || empty($mypassword))) { $msg = $control->login($myusername, $mypassword, $type); } else { echo "<script>alert('Either username or password is missing ')</script>"; } } } ?> <html lang='en'> <head> <meta charset="UTF-8" /> <title> Login