登录界面的代码:
<
html
xmlns="http://www.w3.org/1999/xhtml">
<
head
>
<
meta
http-equiv="Content-Type" content="text/html; charset=utf-8" />
<
title
>无标题文档</
title
>
</
head
>
<
body
>
<
form
action="chuli.php" method="post">
<
div
>用户名:<
input
type="text" name="uid" /></
div
>
<
div
>密码:<
input
type="password" name="pwd" /></
div
>
<
div
><
input
type="submit" value="登录" /></
div
>
</
form
>
</
body
>
</
html
>
|
处理页面的php代码: <?php //造连接对象 //写SQL语句 $sql = "select password from login where username='{$uid}'";
$n = $reslut->fetch_row(); if($uid!="" && $pwd !="" ) |
登陆后跳转到的main界面: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <body> <table width="100%" border="1" cellpadding="0" cellspacing="0"> |