【发布时间】:2015-05-25 03:33:36
【问题描述】:
从图片中可以看出:http://prntscr.com/78wcje
数据未显示在图像顶部。
完整代码:http://pastebin.com/Z1ecden0
<h1>Pernix RsPs<br />
Official ItemDB!</h1>
<br />
<form action="search.php" method="POST">
<input type="text" name="search" /><br /><br />
<input type="Submit" value="Search ItemDB" />
</form>
<table border="0" width="400">
<img src="top.png"></table>
<table border="1" width="400">
<?php
$search = $_POST["search"];
MySQL_connect("localhost", "host", "pass");
MySQL_select_db("dbname");
$result = mysql_query("SELECT * FROM items WHERE name LIKE '%" . mysql_real_escape_string($search) . "%' ORDER by name") or trigger_error(mysql_error().$sql);
while($row = mysql_fetch_array($result))
{
?>
<?
echo '<tr>';
echo '<img src="post.png">';
echo '<td>' . $row['img'] . '</td>';
echo '<td>' . $row['name'] . '</td>';
echo '<td>' . $row['price'] . '</td>';
echo '</tr>';
}
}
?>
</table>
</center>
【问题讨论】:
-
你想让top.png图片作为表格的背景?
-
是的,所以拉取数据时是这样的,prntscr.com/78wgpn