html嵌套php显示用户名

FaaronZheng FaaronZheng 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
$result=mysql_query("select * from user where username='$username'");
if($result)
{
$row=mysql_fetch_row($result);
if($row[1]==$password)
{
session_start();
$_SESSION["username"]=$username;
}
登录的时候把用户名写到session里。在另一个html文件中显示的时候
<?php
session_start();
echo "<h1>用户名</h1>".$_SESSION['username'];
?>
为什么不可以?还有为什么会输出?>这个东西????
...全文

相关推荐

评论 6
收藏 已收藏
分享
返回顶部
FaaronZheng
基础编程 21,889 成员 140,329 内容