<?php
session_start();
if(empty($_COOKIE['username'])&&empty($_COOKIE['password'])){
    if(isset($_SESSION['usern2ame']))
        echo "登录成功，欢迎您".$_SESSION['username']."<a href='logout.php'>退出登录</a>";
    else {
        header("location: login.php "); 
}
}
else {
    #echo "登录成功，欢迎您:".$_COOKIE['username']."<a href='logout.php'>退出登录</a>";
}
?>  

