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

相关文章

php中配置文件操作 如config.php文件的读取修改等操作

复制代码 代码如下: <?php $name="admin";//kkkk $bb='234'; $db=4561321; $kkk="admin"; ?> 函数定义: 配...

PHP实现redis限制单ip、单用户的访问次数功能示例

本文实例讲述了PHP实现redis限制单ip、单用户的访问次数功能。分享给大家供大家参考,具体如下: 有时候我们需要限制一个api或页面访问的频率,例如单ip或单用户一分钟之内只能访问多...

Windows下的PHP安装文件线程安全和非线程安全的区别

从2000年10月20日发布的第一个Windows版的PHP3.0.17开始的都是线程安全的版本,这是由于与Linux/Unix系统是采用 多进程的工作方式不同的是Windows系统是采...

PHP实现的线索二叉树及二叉树遍历方法详解

本文实例讲述了PHP实现的线索二叉树及二叉树遍历方法。分享给大家供大家参考,具体如下: <?php require 'biTree.php'; $str = '...

PHP session常见问题集锦及解决办法总结

1.     错误提示     Warning: Cannot send s...