Home > Backend Development > PHP Tutorial > PHP registration code_PHP tutorial

PHP registration code_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 17:50:53
Original
1061 people have browsed it

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...
Related labels:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template