欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

php-PHP中mysql_num_rows问题

程序员文章站 2022-06-04 12:39:12
...
mysqlphp数据库

php-PHP中mysql_num_rows问题

 
注册
alert('请确认信息完整性!'); history.go(-1);";        }        else        {            if($psw == $psw_confirm)            {                mysql_connect("localhost","root","");   //连接数据库                mysql_select_db("用户表");   //选择数据库                mysql_query("set names 'gdk'"); //设定字符集                $sql = "select username from user where username = '$_POST[username]'"; //SQL语句                $result = mysql_query($sql);    //执行SQL语句                $num = mysql_num_rows($result);

php-PHP中mysql_num_rows问题

 
登陆
alert('请输入用户名或密码!'); history.go(-1);";        }        else        {            mysql_connect("localhost","root","");            mysql_select_db("用户表");            mysql_query("set names 'gbk'");            $sql = "select username,password from user where username = '$_POST[username]' and password = '$_POST[password]'";            $result = mysql_query($sql);            $num = mysql_num_rows($result);