>  기사  >  php教程  >  PHP로 작성된 온라인 주소록

PHP로 작성된 온라인 주소록

大家讲道理
大家讲道理원래의
2016-11-08 11:43:581646검색

<?php
session_start();
define("N", TRUE);
if(empty($_SESSION["uid"])) {
    header("Location: ./login.html");
}
?>
<!doctype html>
<html>
<head>
<title>添加</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<link rel="stylesheet" href="css/index.css" />
<script type="text/javascript" src="js/calendar.js"></script>
</head>
<body>
<?php
    require_once "header.php";
?>
<div id = "add">
<h2 class = "title">添加信息</h2>
<form method = "post" action = "add_do.php">
<table cellpadding = "0" cellspacing = "0">
    <tr>
        <td>姓名:</td>
        <td><input type = "text" name = "username" /></td>
    </tr>
    <tr>
        <td>性别:</td>
        <td>
            男<input type = "radio" name = "usersex" value = "1" checked = "checked" />
            女<input type = "radio" name = "usersex" value = "0" />
        </td>
    </tr>
    <tr>
        <td>生日:</td>
        <td><input type = "text" onclick="new Calendar().show(this);" name = "userbirth" /></td>
    </tr>
    <tr>
        <td>电话:</td>
        <td><input type = "text" name = "usertel"></td>
    </tr>
    <tr>
        <td>地址:</td>
        <td><input type = "text" name = "useraddr"></td>
    </tr>
    <tr>
        <td colspan = "2" style = "text-align:center;">
        <input type = "submit" name = "sub" value = "提 交" />
        </td>
    </tr>
</table>
</form>
</div>
 
<?php
    require_once "footer.php";
?>
</body>
</html>

我是开始学习php时,在win7上用iis搭建一个服务器,如果想通过外网访问这个网站,简易你下载一个花生壳,学生党,只是测试能用。

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.