i have a index.php i just want only logged in user can access the page my code . in the index page is
<?php
error_reporting(0);
$authorized=false;
@session_start();
if(isset($_SESSION['$myusername']) && isset($_SESSION['$mypassword']))
{
$authorized = true;
}
if(!authorized)
{
header('location:login.php');
exit();
}
?>