php注册
<?php
var_dump($_GET);//打印出对象的数据类型
//链接数据库
$link = @mysql_connect('localhost','root','root');
#选择数据库
mysql_select_db('dangao');
#字符集utf8
mysql_set_charset('utf8');
if( !empty($_GET['tel']) && !empty($_GET['pwd'])){
$pwd = md5($_GET['pwd']);
$time = date('Y-m-d H:i:s');
/*echo */$sql = "INSERT INTO user (tel,pwd,time) VALUES('{$_GET['tel']}','{$pwd}','$time')";
mysql_query($sql);
}
//var_dump($link);
//echo time();//时间戳1970
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>注册</title>
</head>
<link rel="stylesheet" href="css/pc.css" />
<body>
<form action='./login.php' name="loginForm" method="get">
<table>
<tbody>
<tr>
<td></td>
<td><input name="tel" type="text" placeholder="登录电话"></td>
</tr>
<tr>
<td></td>
<td><input name="pwd" type="password" placeholder="密码"></td>
</tr>
<tr>
<td><input type="submit" name="" value='注册'></dt>
</tr>
</tbody>
</table>
</form>
</body>
</html>
创建数据库 /创建表 /写入用户电话 密码信息