1. You will be automatically logged out when browser is closed. You can also place a log out link. Add following code somewhere on your page: <a href="your-protected-page.php?logout">Log out</a>
2. Replace if ($_COOKIE['verify'] == md5($lp)) {
with
if ($_COOKIE['verify'] == md5($lp)) {
$login = $key;
Now you can print username using following php code: echo $login;
hi is this the one you meant?
if ($_COOKIE['verify'] == md5($lp)) {
$found = true;
change to
if ($_COOKIE['verify'] == md5($lp)) {
$login = $key;