In every PHP file in my project I am using the following code so that nobody can get into the website without logging in:
<?php
session_start();
if($_SESSION['userid']!="myuserid"){
header("Location: Adminlogon.php");
}
?>
Note that I need only one user id, the user id and password is shared among a group of people.
Is this code safe? Can I do better?