regist.html
<!DOCTYPE html>Title
男女
regist.php
<?php//接收注册数据$uname=$_POST['uname'];$sex=$_POST['sex'];$psd=$_POST['psd'];$birth=$_POST['birth'];echo"欢迎:",$uname,$sex,$psd,$birth;$sql="insert into users (uname,psd,sex,birth) values(?,?,?,?)";$mysqli=newmysqli("47.92.160.192","root","123","test");$stmt=$mysqli->prepare($sql);$stmt->bind_param('ssss',$uname,$psd,$sex,$birth);$stmt->execute();$mysqli->close();//create table users (id int auto_increment primary key,//uname varchar(30),psd varchar(30),sex bool ,birth datetime);
作者:JohnYuCN
链接:https://www.jianshu.com/p/950eb5e463f7
来源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。