mysqli用类操作更有什么优势吧,以前我都是这样写的.和mysql的普通操作差不多的
$link=mysqli_connect('localhost:3306','root','6','shop') or die("failed");
mysqli_query($link,'set names utf8');
$sql="select name,password from tb_admin where name='$_POST[username]' and password='$_POST[password]'";
$restult=mysqli_query($link,$sql);
$array=mysqli_fetch_array($restult);