[請益] 資料庫搜尋和顯示問題
view.php
<html>
<head>
<title></title>
</head>
<body>
<form id="form1" name="forml" method="get" action="search.php">
<input type="text" name="keyin" />
<input type="submit" name="submit" value="搜尋"/>
</body>
</html>
search.php
<?php
$keyin=$_GET["keyin"];
include("dblink.php"); //連結資料庫
$row="SELCET * FROM list WHERE (failname LIKE '%$keyin%') or
(image LIKE '%$keyin%') or (exifname LIKE %$keyin%)";
$result=(mysql_query($row) or die mysql());
$total=mysql_num_row($result);
if ($total>=1)
{
while(list($filename,$image,$exifname=mysql_fetch_row($result)
{
echo "$filename";
echo "$image";
echo "$exifname";
echo "$total";
}else{
echo "not file";
}
}
我想做出論壇搜尋的那種功能
以上是小弟所寫的兩個頁面 在view.php 裡面輸入搜尋字 可以比對資料庫裡面filename
image exifname 三個欄位抓取出來顯示到search.php上
但是每次搜尋頁面都顯示空白 請高手指導一下 我哪裡出了問題 謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.120.76.123
→
09/05 17:12, , 1F
09/05 17:12, 1F
→
09/06 13:09, , 2F
09/06 13:09, 2F