html嵌套php展示用户名

WBOY
Release: 2016-06-13 12:22:24
Original
1122 people have browsed it

html嵌套php显示用户名
$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文件中显示的时候
      session_start();
      echo "

用户名

".$_SESSION['username'];
?>
为什么不可以?还有为什么会输出?>这个东西????
------解决思路----------------------
php 代码只在 php 文件中被执行
------解决思路----------------------
输出的是什么
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template