background image

          <td width="70"><label>
            <input name="username" type="text" id="textfield" size="10" />
          </label></td>
        </tr>
        <tr>
          <td>密码</td>
          <td><label>
            <input name="password" type="password" id="textfield2" size="10" />
          </label></td>
        </tr>
        <tr>
          <td colspan="2">
            <div align="center">
              <input type="submit" name="submit" id="button" value="提交" />
              <input type="reset" name="reset" id="button2" value="重置" />
              </div></td>
        </tr>
      </table>
    </form>
    <?php
    } 
    ?>
    </body>
    </html>
2,config.php
代码示例

:

<?php 
    $dbhost="localhost"; 
    $dbuser="root"; 
    $dbpassword="123456"; 
    $dbname="auth"; 
 

 

 

 $conn=mysql-connect.html 

target=_blank 

class=infotextkey>mysql_connect()

("$dbhost","$dbuser","$dbpassword") or die('不能连接服务器'.mysql_error()); 
    mysql_select_db("$dbname",$conn) or die("数据库访问错误".mysql_errno()); 
    mysql_query()("set names gb2312"); 
?>
3,userlogin.php
代码示例

:

<!DOCTYPE 

html 

PUBLIC 

"-//W3C//DTD 

XHTML 

1.0 

Transitional//EN" 

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<title>登陆系统_www.jbxue.com</title>