我的php代码那有问题啊

来源:百度知道 编辑:UC知道 时间:2024/05/22 05:58:03
<?
session_start();
session_register("validone");
if($validone=="") $validone=0;
function Ispwdcorect($username,$userpass)
{
global $thevalidrec;
$conn_id=mysql_connect("localhost","root","root");
mysql_select_db("m_db",$conn_id);
$anyrecord=mysql_query("select * from tb_psw where uid='$username'and upd='$userpass'");
if($thevalidrec=mysql_fetch_arry($anyrecord))
$checkresult=1;
else
$checkresult=0;
return $checkresul;
}
if(!$validone)
{
if(!$senddata)
{
?>

<center><h2>请输入用户名和密码:</h2>
<form method="post" action="<echo $PHP_SELF;?>">
用户名:<input type="text" name=“yourid”><br>
  密码:<input type="password" name=“yourpass”><br>
      <

if($thevalidrec=mysql_fetch_arry($anyrecord))
$checkresult=1;
else
$checkresult=0;
return $checkresul;
你return的错了,少了个t

你是用什么编辑器呢?推荐你用ZEND,这样就可以减少90%以上的变量名拼写错误了。还可以即时显示语法错误,甚至可以调试。能减少你一半以上的时间。