日期:2014-05-17  浏览次数:20435 次

php小练习

今天晚上玩了玩php,做了个登录页面,纪念一下。。。

代码:

zhuce.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>
<style>
 .aa{
	 font-size:20px;
	 font-family:"幼园";
	  color:blue;
	  text-align:center;
	 }
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body background="www_php/5912802_141854021589_2.jpg">
<form id="form1" name="form1" method="post" action="index.php" >
  <table width="400" height="371" border="0" align="center" bordercolor="#00FF00" >
    <tr>
      <td colspan="2"><div align="center"><font class="aa">注册个人信息</font></div></td>
    </tr>
    <tr>
      <td width="123">学号:</td>
      <td width="261"><input type="text" name="id" id="id" /></td>
    </tr>
    <tr>
      <td height="34">姓名:</td>
      <td><input type="text" name="name" id="name" /></td>
    </tr>
    <tr>
      <td height="37">密码:</td>
      <td><input type="password" name="Password" id="name" /></td>
    </tr>
    <tr>
      <td>性别:</td>
      <td>
        <input name="sex" type="radio"  value="男" checked="checked"  />
        男
        <input name="sex" type="radio"  value="女"   />
        女
        </td>
    </tr>
    <tr>
      <td>出生年月:</td>
      <td><input type="text" name="birth" id="birth" /></td>
    </tr>
    <tr>
      <td>所学专业:</td>
      <td> <select name="major" id="major">
          <option >计算机</option>
          <option>软件工程</option>
          <option>信息管理</option>
        </select>
      </td>
    </tr>
    <tr>
      <td height="72">备注:</td>
      <td><label>
          <textarea name="bz" id="bz" cols="30" rows="5"></textarea>
      </label></td>
    </tr>
    <tr>
      <td>兴趣:</td>
      <td>
          <input type="checkbox" name="XQ[]" value="听音乐"  />
          听音乐
          <input type="checkbox" name="XQ[]" value="看小说" />
          看小说
          <input type="checkbox" name="XQ[]" value="上网" />
          上网
     </td>
    </tr>
    <tr>
      <td colspan="2" align="center">
        <input type="submit" name="bt" id="bt" value="提交" />
      <input type="reset" name="bt1" id="bt1" value="重置" /></td>
    </tr>
  </table>
</form>
</body>
</html>

connect.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=utf-8" />
<title>无标题文档</title&g