| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2661 人关注过本帖
标题:数据库总是接收不到数据
只看楼主 加入收藏
墨明惜月
Rank: 1
等 级:新手上路
帖 子:11
专家分:9
注 册:2016-9-17
结帖率:100%
收藏
 问题点数:0 回复次数:1 
数据库总是接收不到数据
<html>
<head>
<title>注册页面</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<h1>新用户注册</h1>
<hr>
<form method="post" action="biaodang.php">
<table>
<tr>
<td>请输入用户名:&nbsp<input type="text" name="uname"></td>
</tr>
<tr>
<td>请输入密码:&nbsp &nbsp<input type="text" name="upad"></td>
</tr>
<tr>
<td>请再输入密码: &nbsp<input type="text" name="upadd"></td>
</tr>
<tr>
<td>请输入地址:&nbsp &nbsp<input type="text" name="uadd"></td>
</tr>
<tr>
<td>请输入手机号:&nbsp<input type="text" name="uph"></td>
</tr>
<tr>
<td><input type="submit" value="注册">  <input type="reset" value="重置"></td>
</tr>
</table>
</body>
</html>












<html>
<body>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<?php
$name=$_POST["uname"];
$password=$_POST["upad"];
$repassword=$_POST["upadd"];
$useaddress=$_POST["uadd"];
$usephone=$_POST["uph"];
if($password != $repassword)
{
echo "<script>alert('两次密码输入错误,请重新输入')</script>";
echo"<script>location='index.php'</script>";
}
else{
$link= mysql_connect("localhost","root","") or die("数据库连接错误".mysql_error());
mysql_select_db("test",$link);
$sql= "insert into pro(uname,upad,uadd,uph) value ('$name','$password','$useaddress','$usephone')";
$sqlselect="select * from pro order by id";
mysql_close($link);
}
?>

</body>
</html>
搜索更多相关主题的帖子: content 注册页面 输入密码 用户名 action 
2017-02-26 09:37
墨明惜月
Rank: 1
等 级:新手上路
帖 子:11
专家分:9
注 册:2016-9-17
收藏
得分:0 
有没有人啊
2017-02-27 07:56
快速回复:数据库总是接收不到数据
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016058 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved