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

yipeiwu_com6年前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多维数组排序array详解

PHP数组Array按字段排序 /** * Sort array by filed and type, common utility method. * @param...

php中flush()、ob_flush()、ob_end_flush()的区别介绍

flush()、ob_flush()、ob_end_flush()三者的区别:首先,说下buffer,它是一个内存地址空间,为4096(1kb)【在php.ini配置文件中找到outpu...

PHP文件操作之获取目录下文件与计算相对路径的方法

获取目录下文件 1、获取目录下文件,不包括子目录 //获取某目录下所有文件、目录名(不包括子目录下文件、目录名) $handler = opendir($dir); wh...

php UTF8 文件的签名问题

也就是 有BOM 格式编码,或者 无BOM格式编码。 如果看文件的内容,是看不出任何差别的,以下列文件(schema.sqlite.sql)内容为例: schema.sqlite.sql...

php取得字符串首字母的方法

本文实例讲述了php取得字符串首字母的方法。分享给大家供大家参考。具体实现方法如下: <?php $limit = array( //gb2312 拼音排序 arr...