I have made a simple Student Management system using php, JavaScript and CSS. I want to be able to reload the php pages within my system but keep the php sessions that I have set.
Any Solutions?
Here is a snippet of code from a php page. I made a button to go back to the previous page.
<html>
<button class= "submit" onclick="GoBack();">Back To Home Page</button>
</html>
I searched on the internet for a bit and tried to use the event.preventDefault method. It did not work.
`<script>
function GoBack(event,inputText){
window.location="AdminHomePage.php";
event.preventDefault();
}
</script>`
Any Solutions?
I made a login Page in this system and connected it to a database in HeidiSQL using MySQL.
The program checks if these values entered in the login page is in the database. If it is, it is put in a associative array.
if ($num == 1) {
$d = $rs->fetch_assoc();
$_SESSION["t"] = $d;