我无法使我的PHP/XXHTML页面完全加载.我认为这是一个语法错误,但我找不到它


I cannot get my PHP/XHTML page to fully load. I think it is a syntax error but I cannot find it

My更改密码页面未完全加载。我已经搜索错误好几个小时了。仅加载<html><body>标签。我删除了<form>中的PHP,页面加载良好。几个小时以来,我一直在排队。我还运行了一个代码检查器,另外我使用Notepad++,所以它也会检查错误。我确实加载得很好,但当我进行更改时,问题出现了。谢谢你的帮助。

我的文件change_pass.php包含XHTML

<?php include("pass.php") ; ?>//Session username and password.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Change Password</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8"  />
<link rel="stylesheet" type="text/css" href="http://website.com/connect.css"  />
<style type="text/css">
body {
   padding-top:50px;
}
input.frm {
   display:block;
   margin-top:15px;
}
table, input.frm {
   margin-left:auto;
   margin-right:auto;
}
td {
   padding:25px;
}
div.denyer_i {
   margin-right:0px;
}
#log_out_chpw {
   position:absolute;
   top:35px;
   right:20%;
}
</style>
</head>
<body class="change">
<a class="footer_hme" href="http://website.com"></a>
<a id="log_out_chpw" href="http://website.com/log_out.php">Log Out</a>
<br /><br /><br />
<form id="chpw_frm" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]) ; ?>" method="post">
<?php
if ( isset($_SESSION["point"]) )//Username and password check
{
$user_sess = $_SESSION["username"] ;
$pass_sess = $_SESSION["pass"] ;
$usr = $_POST["usr"] ;
$old = $_POST["oldpass"] ;
$new = $_POST["newpass"] ;
$conf = $_POST["confpass"] ;
$usr_in = '<input id="usr_in" class="frm" type="text" name="usr" size="25" maxlength="30"  />' ;
$old_in = '<input id="old_in" class="frm" type="text" name="oldpass" size="25" maxlength="30"  />' ;
$new_in = '<input id="new_in" class="frm" type="text" name="newpass" size="25" maxlength="30"  />' ;
$conf_in = '<input id="conf_in" class="frm" type="text" name="confpass" size="25" maxlength="30"  />' ;
echo( ' <table><tr><td> ' ) ;
         echo( ' <h3>User Name</h3> ' ) ;
         echo( $usr_in ) ;
      echo( ' </td> ' ) ;
      echo( ' <td> ' ) ;
         echo( ' <h3>Old Password</h3> ' ) ;
         echo( $old_in ) ;
      echo( ' </td></tr> ' ) ;
   echo( ' <tr><td> ' ) ;
         echo( ' <h3>New Password</h3> ' ) ;
         echo( $new_in ) ;
      echo( ' </td> ' ) ;
      echo( ' <td> ' ) ;
         echo( ' <h3>Confirm Password</h3> ' ) ;
         echo( $conf_in ) ;
      echo( ' </td></tr> ' ) ;
   echo( ' <tr><td colspan="2"> ' ) ;
   if ( $old === $pass_sess && $usr === $user_sess )
      {
      if ( $new === $conf )
         {
         echo ( '
            <div style="color:#6f6bb6;">Your Password has been changed!</div>
            <br />
            ' ) ;
         }
      else
         {
         if ( $usr !== $user_sess )
            {
            echo ( '
               <div class="denyer_i">Incorrect User Name!</div>
               <br /><br />
               ' ) ;
            }
         if ( $new !== $conf )
            {
            echo ( '
               <div class="denyer_i">Your Confirmation Password does not match!</div>
               <br /><br />
               ' ) ;
            }
         }
      }
   else
      {
      echo ( '
         <div class="denyer_i">Incorrect!</div>
         <br /><br />
         ' ) ;
      }
   }
         echo ( ' <input class="log_sub" name="Sub" type="submit" value="Change Password"  /> ' ) ;
         echo ( ' <input class="log_sub" name="res" type="reset" value="Clear" style="margin-right:0px;"  /> ' ) ;
      echo ( ' </td></tr></table> ' ) ;
}
?>
</form>
<p class="cpy">2014-<?php echo date("Y") ; ?> website. All rights reserved.</p>
</body>
</html>

我的pass.php文件

<?php
session_start() ;
$_SESSION["username"] = "user" ;
$_SESSION["pass"] = "pass" ;
$_SESSION["point"] ;
?>

也是因为PHP需要登录。另一个页面的链接链接到更改密码页面isset($_SESSION["point"])

在3个回波之后有1个外括号,将其移除

    $usr_in = '<input id="usr_in" class="frm" type="text" name="usr" size="25" maxlength="30"  />' ;
    $old_in = '<input id="old_in" class="frm" type="text" name="oldpass" size="25" maxlength="30"  />' ;
    $new_in = '<input id="new_in" class="frm" type="text" name="newpass" size="25" maxlength="30"  />' ;
    $conf_in = '<input id="conf_in" class="frm" type="text" name="confpass" size="25" maxlength="30"  />' ;
    echo( ' <table><tr><td> ' ) ;
    echo( ' <h3>User Name</h3> ' ) ;
    echo( $usr_in ) ;
    echo( ' </td> ' ) ;
    echo( ' <td> ' ) ;
    echo( ' <h3>Old Password</h3> ' ) ;
    echo( $old_in ) ;
    echo( ' </td></tr> ' ) ;
    echo( ' <tr><td> ' ) ;
    echo( ' <h3>New Password</h3> ' ) ;
    echo( $new_in ) ;
    echo( ' </td> ' ) ;
    echo( ' <td> ' ) ;
    echo( ' <h3>Confirm Password</h3> ' ) ;
    echo( $conf_in ) ;
    echo( ' </td></tr> ' ) ;
    echo( ' <tr><td colspan="2"> ' ) ;
    if ( $old === $pass_sess && $usr === $user_sess )
    {
        if ( $new === $conf )
        {
            echo ( '
                <div style="color:#6f6bb6;">Your Password has been changed!</div>
                <br />
                ' ) ;
        }
        else
        {
            if ( $usr !== $user_sess )
            {
                echo ( '
                    <div class="denyer_i">Incorrect User Name!</div>
                    <br /><br />
                    ' ) ;
            }
            if ( $new !== $conf )
            {
                echo ( '
                    <div class="denyer_i">Your Confirmation Password does not match!</div>
                    <br /><br />
                    ' ) ;
            }
        }
    }
    else
    {
        echo ( '
            <div class="denyer_i">Incorrect!</div>
            <br /><br />
            ' ) ;
    }
//}
    echo ( ' <input class="log_sub" name="Sub" type="submit" value="Change Password"  /> ' ) ;
    echo ( ' <input class="log_sub" name="res" type="reset" value="Clear" style="margin-right:0px;"  /> ' ) ;
    echo ( ' </td></tr></table> ' ) ;
}
?>

只是猜测,但是。。。你的错误可能只是你写了

$user_sess = $_SESSION["userbame"] ;

而不是

$user_sess = $_SESSION["username"] ;

("userbame"而不是"username")。