PHP registration code

巴扎黑
Release: 2016-11-24 09:33:15
Original
1202 people have browsed it

$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 ("<script>alert('注册成功 !');history.back; </script>");

          }

              else

           { echo("用户名不能为空!");

        }

}

else

{ echo("数据源连接失败!"); }

?>




source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template