Home  >  Article  >  Backend Development  >  PHP registration code_PHP tutorial

PHP registration code_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:50:53977browse

PHP registration code

$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('Registration successful!');history.back; </script>");

}

else

{echo ("The user name cannot be empty!");

}

}

else

{ echo("Data source connection failed!"); }

?>



Excerpted from 2012317256

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478245.htmlTechArticlePHP registration code?php $Uname=$_POST[Uname]; $Pwd=$_POST[Pwd]; $ register=$_POST[register]; $link=mysql_connect(localhost,root,12345); if($link) { $db_selected=mysql_query(use regist...
Statement:
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