JezK
Edit File: index.php
<?php session_start(); include_once("sa_operations.php"); $con=new sa_operations(); $appdetails=$con->gettingAppDetails(); if(isset($_POST['SignIn'])) { $con=new sa_operations(); $res=$con->admin_login($_POST['username'],$_POST['password']); if($res!=ERR202) { $_SESSION['master']['auth']=$res[0]; $_SESSION['master']['me_id']=$res[1]; header('Location:schoolmanagement.php'); } else { echo "<script>alert('Invalid Credentials');</script>"; } } if(isset($_POST['forgot_email'])) { $password=$con->forgotpwd_sendpasswordbyemail($_POST['forgot_email']); if($password==1) { echo "<script>alert('Password was sent to your mail');</script>"; } if ($password == 2) { echo "<script>alert('Password was not sent ');</script>"; } if ($password == 3) { echo "<script>alert('Invalid Email');</script>"; } } ?> <!DOCTYPE HTML> <html> <head> <title>Skoolonline-Super Admin</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="shortcut icon" href="images/skoolonline.png" / width="16px" height="auto"> <!-- <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> --> <link href='http://fonts.googleapis.com/css?family=Rokkitt' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="ui/startupcss.css" type="text/css"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-aFq/bzH65dt+w6FI2ooMVUpc+21e0SRygnTpmBvdBgSdnuTN7QbdgL+OapgHtvPp" crossorigin="anonymous"> </head> <body> <script> function checkfields() { var a = document.getElementById('username').value; var b = document.getElementById('password').value; if (a == '') { alert('Please Enter Email'); return false; } if (b == '') { alert('Please Enter Password'); return false; } } function check_email() { var a = document.getElementById('forgot_email').value; if (a == '') { alert('Please Enter Email'); return false; } } </script> <div class="wrap"> <!-- strat-contact-form --> <div class="contact-form bg-body m-auto row p-3"> <!-- start-form --> <!-- <form class="contact_form " method="post" name="contact_form"> <img class="img" src="images/logo.png" height="60" width="" style=" display:block; margin-left: 60px;margin-right:px;margin-top:45px;margin-bottom:15px; "> <ul> <li> <input type="text" class="textbox1" name="username" id="username" placeholder="Email" style="margin-top:4px;" value="" autofocus> </li> <li> <input type="password" name="password" id="password" class="textbox2" placeholder="Password" style="margin-top:4px;"> </li> </ul> <input type="submit" name="SignIn" value="Login" onclick="return checkfields()" /> <div class="clear"></div> <div class="forgot"> <a href="#" data-target="#pwdModal" data-toggle="modal" style="margin-left:18px;">Forgot password?</a> </div> <div class="clear"></div> </form> --> <div class="col-12 col-md-6 p-4"> <form method="post" name="contact_form"> <div class="text-center"> <img class="img" src="images/logo.png" height="60" width=""> </div> <div class="my-3"> <input type="text" name="username" id="username" placeholder="Email" class="form-control" required> </div> <div class="my-1"><input type="password" name="password" id="password" placeholder="Password" class="form-control" required></div> <div> <input type="submit" class="log-in-button" name="SignIn" value="Login" onclick="return checkfields()" /> <div class="clear"></div> </div> <div class="text-end forgot my-0"> <a href="#" data-bs-toggle="modal" data-bs-target="#pwdModal">Forgot password?</a> </div> </form> </div> <!-- end-form --> <!-- start-account --> <div class="account col-md-6 col-12 d-flex justify-content-center"> <div class="img"> <img src=" images/Login-logo1.png"> <div class="clear"></div> </div> </div> <!-- end-account --> <div class="clear"></div> </div> <!-- end-contact-form --> <!--modal--> <div id="pwdModal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <!-- <button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="margin:20px; "> ✕ </button> --> <form id="forgt" name="forgt" method="post" action="#"> <div class="modal-body "> <div class="col-md-12 "> <div class="panel panel-default"> <div class="panel-body"> <div class="text-center"> <!-- <p></p> --> <div class="panel-body"> <fieldset> <div class="form-group"> <!-- <input class="form-control input-lg" placeholder="E-mail Address" id="forgot_email" name="forgot_email" type="email"> --> <input type="email" name="forgot_email" id="forgot_email" placeholder="E-mail Address" class="form-control" required> </div> <input class="btn btn-primary" value="Send My Password" type="submit" style="background-color:#01aee6;margin-top: 1rem; width: 100%;" onclick="return check_email()"> </fieldset> </div> </div> </div> </div> </div> </div> </form> <div class="modal-footer"> <div class="col-md-12"> </div> </div> </div> </div> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <!-- <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> --> <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js" integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/js/bootstrap.min.js" integrity="sha384-heAjqF+bCxXpCWLa6Zhcp4fu20XoNIA98ecBC1YkdXhszjoejr5y9Q77hIrv8R9i" crossorigin="anonymous"></script> </body> </html>