這個簡單??!
我們提供的服務有:網(wǎng)站設計制作、網(wǎng)站建設、微信公眾號開發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認證、阜新ssl等。為千余家企事業(yè)單位解決了網(wǎng)站和推廣的問題。提供周到的售前咨詢和貼心的售后服務,是有科學管理、有技術的阜新網(wǎng)站制作公司
首頁做個前臺輸入姓名和會員卡信息的頁面,我做個簡單的頁面給你看
!DOCTYPE?html?PUBLIC?"-//W3C//DTD?XHTML?1.0?Transitional//EN"?""
html?xmlns=""
head
meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/
title會員查詢系統(tǒng)/title
/head
body
form?id="form1"?name="form1"?method="post"?action="test.php"
p
label?for="name"/label
input?type="text"?name="name"?id="name"?/
/p
p
label?for="vipid"/label
input?type="text"?name="vipid"?id="vipid"?/
/p
p
input?type="submit"?name="button"?id="button"?value="查詢"?/
/p
/form
/body
/html
然后我給你一個test.php的文件代碼:
?php
$name????=????trim($_POST['name']);
$vipid????=????trim($_POST['vipid']);
$con?=?mysql_connect("127.0.0.1","數(shù)據(jù)庫用戶名","數(shù)據(jù)庫密碼");
if?(!$con)
{
die('Could?not?connect:?'?.?mysql_error());
}
$a????=????mysql_select_db("數(shù)據(jù)庫名字",?$con);
$sql????=????"select?*?from?kh_customer?where?name?=?'$name'?and?vipid?=?'$vipid'";
$result?=?mysql_query($sql);
while($row?=?mysql_fetch_array($result))
{
echo?$row['name']?.?"?"?.?$row['data'];
echo?"br?/";
}
mysql_close($con);
?
頁面美化自己去搞!只能幫你這么多了
這個簡單?。?/p>
首頁做個前臺輸入姓名和會員卡信息的頁面,我做個簡單的頁面給你看
!DOCTYPE?html?PUBLIC?"-//W3C//DTD?XHTML?1.0?Transitional//EN"?"
html?xmlns="
head
meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/
title會員查詢系統(tǒng)/title
/head
body
form?id="form1"?name="form1"?method="post"?action="test.php"
p
label?for="name"/label
input?type="text"?name="name"?id="name"?/
/p
p
label?for="vipid"/label
input?type="text"?name="vipid"?id="vipid"?/
/p
p
input?type="submit"?name="button"?id="button"?value="查詢"?/
/p
/form
/body
/html
然后我給你一個test.php的文件代碼:
?php
$name????=????trim($_POST['name']);
$vipid????=????trim($_POST['vipid']);
$con?=?mysql_connect("127.0.0.1","數(shù)據(jù)庫用戶名","數(shù)據(jù)庫密碼");
if?(!$con)
{
die('Could?not?connect:?'?.?mysql_error());
}
$a????=????mysql_select_db("數(shù)據(jù)庫名字",?$con);
$sql????=????"select?*?from?kh_customer?where?name?=?'$name'?and?vipid?=?'$vipid'";
$result?=?mysql_query($sql);
while($row?=?mysql_fetch_array($result))
{
echo?$row['name']?.?"?"?.?$row['data'];
echo?"br?/";
}
mysql_close($con);
?
頁面美化自己去搞!只能幫你這么多了
你所涉及的問題有兩方面。
1、php列表程序;把文章標題、作者、日期、點擊率等列表顯示。
2、php分頁程序;對當所有的列表項進行分面,并按照分頁進行顯示。
因為列表程序可以說是項目中比較重要的程序,就像電腦主板一樣,上面承載有很多的鏈接,相對有點復雜。簡單一點跟你說,又怕你弄不清楚,說詳細一點,你可能又更糊涂了。下面把思路跟你說一下吧:
(1)從數(shù)據(jù)庫中循環(huán)讀出符合要求的記錄,不斷賦值給數(shù)組,如$title[$i];
在這期間,要獲取記錄總數(shù)、總頁數(shù)、當前頁數(shù)等內容;
(2)做靜態(tài)頁面,循環(huán)做表格(行),從數(shù)組中不斷取值;
(3)顯示分頁的鏈接和跳轉行;
程序并不是很難,只是比較繁瑣。如果你急需現(xiàn)成的,就把數(shù)據(jù)庫相關信息發(fā)到我郵箱,幫你定制一個,你自己再改。
這個很簡單的,先說個比較容易理解的方法
將while循環(huán)方式修改下即可。
echo('trtdname/td');
while($row?=?mysqli_fetch_array($result)){
echo('td'.$row['name'].'/td');
}
echo('/tr');
echo('trtdgender/td');
while($row?=?mysqli_fetch_array($result)){
echo('td'.$row['gender'].'/td');
}
echo('/tr');
echo('trtdage/td');
while($row?=?mysqli_fetch_array($result)){
echo('td'.$row['age'].'/td');
}
echo('/tr');
分享名稱:php數(shù)據(jù)展示 php數(shù)據(jù)處理
網(wǎng)站網(wǎng)址:http://jinyejixie.com/article22/hpcdjc.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站排名、網(wǎng)站設計、微信公眾號、搜索引擎優(yōu)化、靜態(tài)網(wǎng)站、商城網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)