php實現(xiàn)在線通訊錄功能(附源碼)
本文實例為大家分享php在線通信錄編寫代碼,供大家參考,具體內(nèi)容如下
<?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>
源碼下載:在線通訊錄
以上就是本文的全部內(nèi)容,希望對大家學習php程序設(shè)計有所幫助。
相關(guān)文章
PHP怎么實現(xiàn)網(wǎng)站保存快捷方式方便用戶隨時瀏覽
網(wǎng)站保存快捷方式以后在瀏覽起來就比較方便了,實現(xiàn)的方法有很多,下面為大家詳細介紹下使用PHP實現(xiàn)網(wǎng)站快捷方式的保存,有此需求的朋友可以參考下,希望對大家有所幫助2013-08-08php自定義函數(shù)br2nl實現(xiàn)將html中br換行符轉(zhuǎn)換為文本輸入中換行符的方法【與函數(shù)nl2br功能相反】
這篇文章主要介紹了php自定義函數(shù)br2nl實現(xiàn)將html中br換行符轉(zhuǎn)換為文本輸入中換行符的方法,具有與函數(shù)nl2br相反的功能,并附帶了相應(yīng)的JS實現(xiàn)方法,需要的朋友可以參考下2017-02-02PHP使用PDO訪問oracle數(shù)據(jù)庫的步驟詳解
POD擴展是在PHP5中加入,該擴展提供PHP內(nèi)置類 PDO來對數(shù)據(jù)庫進行訪問,不同數(shù)據(jù)庫使用相同的方法名,解決數(shù)據(jù)庫連接不統(tǒng)一的問題。下面這篇文章主要給大家介紹了關(guān)于PHP使用PDO訪問oracle數(shù)據(jù)庫的步驟,需要的朋友可以參考下。2017-09-09PHP中數(shù)字檢測is_numeric與ctype_digit的區(qū)別介紹
PHP中的兩個函數(shù)is_numeric和ctype_digit都是檢測字符串是否是數(shù)字,但也存在一點區(qū)別2012-10-10PHP has encountered an Access Violation at 7C94BD02解決方法
PHP has encountered an Access Violation at 7C94BD02解決方法2009-08-08PHP+APACHE實現(xiàn)網(wǎng)址偽靜態(tài)
這篇文章主要介紹了PHP+APACHE通過使用mod rewrite模塊實現(xiàn)網(wǎng)址偽靜態(tài)的相關(guān)資料,需要的朋友可以參考下2015-02-02