日期:2014-05-16  浏览次数:20780 次

怎么使登录窗口在登录成功后显示“欢迎XXX”?
初学者,不甚明白,请各位师傅大神们讲得浅显一点,最好能有一小段示例的代码,感激

------解决方案--------------------
登录成功后,把用户名记录在session里,在想要显示的地方打印session就可以了。
------解决方案--------------------
public function get_show_msg($url,$show='登录成功!') {
$msg='<!DOCTYPE html PUBLIC"..//W3C//DTD XHTML 1.0 Transitiaonl//EN"
"http://www.w3.org/TR/xhtmll/DTD/xhtmll-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<link rel="stulesheet" href="public/common.css"type="text/css"/>
<meta http-equiv="refresh" content="2;url=' .$url. '"/>
<title> 消息提示 </title>
</head>
<body>
<div id="man_zone">
<table width="30%"border="1" align="center" cellpadding="3"cellspacing="0"class="table"
style="margin-top:100px;">
<tr>
<th align="center" style="background:#cef">信息提示</th>
</tr>
<tr>
<td><p>'.$show.'<br />
2秒后返回指定主页!<br />
如果浏览器无法跳转,<a href="'.$url.'">请点击这里</a>.</p></td>
</tr>
</table>
</div>
</body>
</html>' ;
echo $msg;
exit();
}
}