Home  >  Article  >  Backend Development  >  Example of implementing online address book in php

Example of implementing online address book in php

*文
*文Original
2017-12-29 18:57:303249browse

This article mainly introduces the specific code of PHP to implement the online address book function in detail. It has certain reference value and interested friends can refer to it. I hope to be helpful.

The example in this article is to share the PHP online address book writing code for your reference. The specific content is as follows

<?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";
?>
<p 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>
</p>
 
<?php
  require_once "footer.php";
?>
</body>
</html>

Related recommendations:

PHP simply implements socks5 proxy server

php encapsulated search class instance

How to learn MVC framework in PHP

The above is the detailed content of Example of implementing online address book in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn