<?php session_start(); $role = $_SESSION['role']; if($role == 1) { echo "<script>window.location.href = 'Adminpage.php';</script>"; } if($role == 0) { echo "<script>window.location.href = 'UserAccount.html';</script>"; } ?>