时间:2021-07-01 10:21:17 帮助过:9人阅读
$Uname=$_POST["Uname"];
$Pwd=$_POST["Pwd"];
$register=$_POST["register"];
$link=mysql_connect("localhost","root","12345");
if($link)
{
$db_selected=mysql_query("use register", $link);
if ( $register="register")
{
if ( $Uname !="" )
{
$result=mysql_query("insert into [user] (Uname , Pwd) values($Uname, $Pwd)" , $link);
echo ("");
}
else
{ echo("用户名不能为空!");
}
}
else
{ echo("数据源连接失败!"); }
?>
摘自 2012317256
http://www.bkjia.com/PHPjc/478245.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/478245.htmlTechArticlePHP 注册代码 ?php $Uname=$_POST[Uname]; $Pwd=$_POST[Pwd]; $register=$_POST[register]; $link=mysql_connect(localhost,root,12345); if($link) { $db_selected=mysql_query(use regist...