国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > PHP > 正文

PHP實現的迷你漂流瓶

2020-03-22 19:26:27
字體:
來源:轉載
供稿:網友
本文實例講述了PHP實現的迷你漂流瓶。分享給大家供大家參考。具體如下:mysql.php:mysql_connect('127.0.0.1','root','wjy123') or die('exit(-1)');mysql_select_db('floatbtn');mysql_query('set names utf8');pickbtn.php: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" html xmlns="http://www.w3.org/1999/xhtml" head meta http-equiv="Content-Type" content="text/html; charset=utf-8" / title ppick u /title style type="text/css" .btn { font-family: "微軟雅黑"; font-size: 12px; color: #FFF; background-color: #369; border: 1px solid #666;.box { font-family: "微軟雅黑"; color: #369; font-size: 12px; border: 1px solid #369; /style /head body a href='throwbtn.php' 發布信息 /a form id="form1" name="form1" method="post" action="pickbtn.php" table width="80%" border="0" @include('mysql.php');if(isset($_REQUEST['new'])){$q = 'SELECT * FROM `btn`';$rs = mysql_query($q);$max = mysql_num_rows($rs);$rd = rand(1,$max);$q = "select * from `btn` where id = {$rd}";$rs = mysql_query($q);while($re = mysql_fetch_array($rs)){ td width="12%" ID : /td td width="88%" =$re['author'] /td /tr td Text : /td td =$re['text'] /td /tr td Date : /td td =$re['date'] /td /tr p 已讀標記 =$re['flag'] /p /table $q = "update `btn` set flag = 1 where id = {$re['id']}";mysql_query($q); input name="new" type="submit" value="截取"/ /form /body /html throwbtn.php: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" html xmlns="http://www.w3.org/1999/xhtml" head meta http-equiv="Content-Type" content="text/html; charset=utf-8" / title 微軟雅黑 /title style type="text/css" .btn { font-family: "微軟雅黑"; font-size: 12px; color: #FFF; background-color: #369; border: 1px solid #666;.box { font-family: "微軟雅黑"; color: #369; font-size: 12px; border: 1px solid #369;.box1 { font-family: "微軟雅黑"; font-size: 12px; color: #369; width: 800px; border: 1px solid #666; /style /head body a href='pickbtn.php' 截取信息 /a @include('mysql.php');if(isset($_REQUEST['send'])){ echo 'Publish Successed ! br $author = $_REQUEST['author']; $text = $_REQUEST['text']; $date = date('Y-m-d h:m:s'); if(!(null == trim($author)) && !(null == trim($text))) { $q = "insert into `btn`(`id`,`author`,`text`,`date`,`flag`) values('','$author','$text','$date','0')"; mysql_query($q); form id="form1" name="form1" method="post" action="throwbtn.php" table width="80%" border="0" th width="110" ID /th td width="442" input type="text" name="author" / /td /tr th Text /th td input name="text" type="text" / /td /tr th Date /th input type="text" name="date" disabled="disabled" value=" =date('Y-m-d') " / /td /tr /table div align="center" input name="send" type="submit" value="Send Message"/ /div /form /body /html 希望本文所述對大家的php程序設計有所幫助。PHP教程

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 成武县| 佳木斯市| 西峡县| 绥阳县| 吴江市| 英山县| 乌恰县| 北宁市| 巫溪县| 延庆县| 南皮县| 龙泉市| 樟树市| 淅川县| 淄博市| 株洲市| 连平县| 云浮市| 乌海市| 四子王旗| 财经| 城口县| 青铜峡市| 九龙县| 湘西| 崇左市| 庆元县| 乐至县| 天津市| 泽州县| 富锦市| 万年县| 古浪县| 买车| 云霄县| 漳州市| 伊宁县| 崇仁县| 黄陵县| 依安县| 封开县|