<?php session_start(); if(isset($_SESSION['admin_sid']) || isset($_SESSION['customer_sid'])) { header("location:index.php"); } el code example
Example: session start php
<?php
// This sends a persistent cookie that lasts a day.
session_start([
'cookie_lifetime' => 86400,
]);
?>