$db=mysql_connect("localhost","root","mysql"); mysql_select_db("mb",$db); $sqltxt="select * from user where name=".$name; $Result=mysql_query($sqltxt,$db); $myrow=mysql_fetch_row($Result); if($myrow.next()){ if($myrow.getint(".$id.").equals(id)) { echo "success"; }
else echo "!=id";
}
else
echo " $myrow.next() is wrong ";
这时怎么就进不了index.php呢, 地址是对的,http://localhost/exe/do_login01.php .next() is wrong 应该是这几句有问题 $sqltxt="select * from user where name=".$name; $Result=mysql_query($sqltxt,$db); $myrow=mysql_fetch_row($Result); if($myrow.next()){ if($myrow.getint(".$id.").equals(id)) 帮我看看怎么改??
地址是对的,http://localhost/exe/do_login01.php 输不了 success 输出 .next() is wrong 应该是这几句有问题 $sqltxt="select * from user where name=".$name; $Result=mysql_query($sqltxt,$db); $myrow=mysql_fetch_row($Result); if($myrow.next()){ if($myrow.getint(".$id.").equals(id)) 帮我看看怎么改?? 谢谢
$sqltxt="select * from user where name=".$name; //name= name like?$Result=mysql_query($sqltxt,$db);
$myrow=mysql_fetch_row($Result);
print_r($myrow);exit;