数据库连接和乱码问题
数据库连接以前用mysql_connect不过这种方法很快就要放弃使用,推荐使用mysqli_connect
$conn = mysqli_connect("服务器地址","用户名","密码","数据库");
mysqli_query($conn,"SET NAMES 'UTF8'"); //防止乱码
$sql="insert into v9_form_fanganliuyan(userid,username,datetime,ip,place,mobile)
values('','','{$time}','','{$place}','{$mobile}')";
$r=mysqli_query($conn,$sql);//执行sql