$sql="select user_name,user_password from tab_user where user_name='{$_POST[td_username]}' and user_password='{$_POST[td_password]}'";

解决方案 »

  1.   

    $sql="select user_name,user_password from tab_user where user_name='$_POST[td_username]' and user_password='$_POST[td_password]'";
      

  2.   

    一楼正解
    而且提请注意的是
    $puser_name=$r["user_name"];
    $ppassword=$r["user_password"];
    里面通过页面传递的name和password也应该是$_POST[]的形式
      

  3.   

    不好意思
    应该是
    $sql="select user_name,user_password from tab_user where user_name='$_POST[td_username]' and user_password='$_POST[td_password]'";
      

  4.   

    $sql="select user_name,user_password from tab_user where user_name='" . $_POST[td_username] . "' and user_password='" . $_POST[td_password] . "'";
      

  5.   

    解决了旧问题,又有新问题了.......
    http://community.csdn.net/Expert/topic/4057/4057316.xml?temp=.1268122