A very detailed login code, for PHP beginners have a lot of help, the need for friends can be viewed for free.
。
index.php Tutorials
The code is as follows |
Copy Code |
System Login
System Background Login
|
Database Tutorial Connect connect.php
The code is as follows |
Copy Code |
$connect =mysql tutorial _connect ("localhost", "root", "") or Die ("Server Connection Failed"); mysql_select_db ("Test", $connect) or Die ("no corresponding database established"); $sql = "SELECT * from admin"; ?> |
Image Verification Code piccheck.php
The code is as follows |
Copy Code |
/* * Created on 2011-8-10 * * To change the template for this generated file go to * Window-preferences-phpeclips Tutorial E-php-code Templates */ Session_Start (); $code =rand (0,9). Dechex (rand (10,15)). Rand (0,9). Dechex (rand (10,15)); $_session[pic]= $code; $image =imagecreatetruecolor (50,18); $color =imagecolorallocate ($image, 0,0,0);//Use a color palette for the first time, set as background color $colortext =imagecolorallocate ($image, Rand (100,255), Rand (100,255), Rand (100,255)); Imagestring ($image, 10,rand (1,15), rand (1,5), $code, $colortext); Imagegif ($image); ?> |
CSS.CSS file
code as follows |
copy code |
@charset "Utf-8"; /* CSS Document */ Body { Background-color: #9CF; Text-align:left; } #denglu { width:400px; margin-top:0px; Margin-right:auto; margin-bottom:0px; Margin-left:auto; Background-image:url (images/login.gif); Background-repeat:no-repeat; height:320px; text-indent:6px; } #box #denglu Form { position:relative; top:50px; left:10px; width:92%; } . Must { Color: #F00; font-size:12px; } #box #denglu #pic { Background-image:url (images/dot1.gif); Background-repeat:no-repeat; height:20px; width:100px; font-size:12px; Color: #F00; Text-align:left; line-height:18px; left:10px; top:30px; position:relative; } |
http://www.bkjia.com/PHPjc/631327.html www.bkjia.com true http://www.bkjia.com/PHPjc/631327.html techarticle A very detailed login code, for PHP beginners have a lot of help, the need for friends can be free to view. index.php Tutorial Code Copy Code as follows! DOCTYPE ...