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