php实现在线通讯录功能(附源码)

时间:2022-09-24 17:22:01

本文实例为大家分享php在线通信录编写代码,供大家参考,具体内容如下

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?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 = "提&nbsp;交" />
    </td>
  </tr>
</table>
</form>
</div>
 
<?php
  require_once "footer.php";
?>
</body>
</html>

源码下载:在线通讯录

以上就是本文的全部内容,希望对大家学习php程序设计有所帮助。