Hi sorry I am just a baby in PHP. I want to get the value of $_SESSION['username']
but it gives me this error
Notice: Undefined offset: 0
Please see my code below. Your help will be greatly appreciated. Thanks.
<?php
session_start();
$_SESSION['username']='andrew';
$_SESSION['password']='pass';
$session=count($_SESSION);
echo "There are {$session} current sessions!";
echo "<br />";
echo $_SESSION[0]; //I want an output "andrew" but it fails.
?>