登录的实现
<?php
$mysql_conf = array(
'host' =>'127.0.0.1:3306',
'db' =>'learn',
'db_user'=>'root',
'db_pwd' =>'root',
);
//session_start();
header('Content-Type:application/json; charset=utf-8');
$myname = $_POST['login_name'];
$mypass = $_POST['login_pass'];
if($myname!=''&&$mypass!='')
{
$conn = new mysqli("127.0.0.1:3306", "root", "root");
if($conn->connect_errno){
die("could not connect to the database:\n" . $mysqli->connect_errno);//诊断连接错误
}
$conn->query("