我是新手,我知道如何在ASP.net中使用用户控件来做这件事,但我只需要检查用户是否登录并显示不同的内容。
我做错了什么??
<?php
session_start();
if(session_is_registered(myusername)){ $html = "<div id=\"welcome_admin\">
<table>
<tr><th>Change your welcome text!</th></tr>
<tr><td><input name=\"welcome_text\" type=\"text\" id=\"welcome_text\"> </td></tr>
<tr><td><input name=\"submit\" type=\"submit\" ></td></tr>
</table></div>"
} else { $html = "<div id=\"welcome\">
<table>
<tr><th>Welcome</th></tr>
<tr><td>Log in to add a welcome text</td></tr>
</table></div>"
}
?>
<html>
<head>
</head>
<body>
<?php print $html; ?>
</body>
</html>发布于 2012-02-18 23:19:26
$html = "<div id=\"welcome_admin\">
<table>
<tr><th>Change your welcome text!</th></tr>
<tr><td><input name=\"welcome_text\" type=\"text\" id=\"welcome_text\"> </td></tr>
<tr><td><input name=\"submit\" type=\"submit\" ></td></tr>
</table></div>";标记;
else语句也是如此..
https://stackoverflow.com/questions/9342342
复制相似问题