应该可以啊,你先看看 print $_POST['username'] 有没有值啊?

解决方案 »

  1.   

    &username=$_SESSION['name'];这个前面为什么用&   
      

  2.   

    没有做过SESSION_UNREGIST
    print $_POST['username'] 没有值输出呀!!
      

  3.   

    print $_POST['username'] 没有值输出呀!!
    ---------------------------------------
    那就说明你根本没有把名字上传到服务器!
    把代码贴上来吧
      

  4.   

    这页面是赋值的
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_POST['username'])) {
      $username=$_POST['username'];
      $usernamepassword=$_POST['usernamepassword'];
       session_start();
    $_SESSION['namee']=$username;
    ....
    }
    <form name="form1" method=POST action=<?php echo $loginFormAction; ?>>
    <table  align="center">
    <tr bgcolor="#DBDBF0">
    <td>
    <? echo "$error";?>
    </td>
    </tr>
    </table>
    <table  align="center">
      <tr bgcolor="#DBDBF0">
        <td >
    User Name</td>
    <td>
    <input type="text" name="username" title="input username" value="<?echo $username;?>" size="<?echo $REGULAR_INPUT_SIZE;?>"/*>
    </td>
      </tr>
      <tr bgcolor="#DBDBF0">
    <td>
    Password </td>
    <td>
    <input type="password" name="usernamepassword"  title="input userpassword" value="<?echo $usernamepassword;?>" size="<?echo $REGULAR_INPUT_SIZE;?>"/*>
    </td>
      </tr>
      <tr >
        <td align="center" >
    <input type="submit" name="submit" value="Continue"/>
    </td>
      </tr>
     </table>
     </form>
    这一页面是取值的:
    <?php 
    ......
    session_start();
    echo $_SESSION['namee'];
    ......
    ?>
      

  5.   

    print_r($_POST)和print_r($_SESSION)看看有东西没
      

  6.   

    *号有没有没关系!
    用了这句print_r($_SESSION)以后输出结果是:Array()