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

yipeiwu_com5年前PHP代码库

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

<?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程序设计有所帮助。

相关文章

Mac系统下安装PHP Xdebug

Mac系统下安装PHP Xdebug

Mac下安装PHP调试工具Xdebug 安装步骤 brew install php70 brew install php70-xdebug php -i | grep...

php数组一对一替换实现代码

复制代码 代码如下: <?php header("Content-type: text/html; charset=utf-8"); function multiple_repla...

php 运行效率总结(提示程序速度)

1,在函数中,传递数组时 使用 return 比使用 global 要高效 比如 function userloginfo($usertemp){ $detail=explode("|"...

PHP中for循环与foreach的区别

for循环与foreach的区别 foreach 依赖 IEnumerable. 第一次 var a in GetList() 时调用 GetEnumerator 返回第一个对象并赋给a...

PHP合并数组+与array_merge的区别分析

主要区别是两个或者多个数组中如果出现相同键名,键名分为字符串或者数字,需要注意 1)键名为数字时,array_merge()不会覆盖掉原来的值,但+合并数组则会把最先出现的值作为最终结果...