日期:2014-05-17  浏览次数:20540 次

求助 使用匹配查询mysql得到结果后如何在另外一个页面显示?
本帖最后由 maniachhz 于 2012-11-25 16:16:01 编辑
大家好,
问题是这样的.
我新建了一个表用来保存licenses,
create table fwbd_mac
( mac_eth char(12) not null,  //保存mac号
  mac_license varchar(750) not null, //保存license文件
  mac_date date not null,
  primary key (mac_eth),
  unique license_index (mac_license)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;


我使用匹配查询数据库后得到多个结果, 用表格输出. license字段文件内容我想在show_info.php 页面显示, 请问如何把得到的$row['mac_eth']传递到show_info.php查询licnese? 我这样写,得无效
echo "<td><a href ='show_info.php?mac_eth=$row['mac_eth']'>显示</a></td>";  PHP解释器parse error .
		
while ($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>".add_delimiter(strtoupper($row['mac_eth']))."</td>";
echo "<td><a href ='show_info.php'>显示</a></td>";
echo "<td>".$row['mac_date']."</td>";
echo "</tr>";
}

------解决方案--------------------
echo "<td><a href ='show_info.php?mac_eth={$row['mac_eth']}'>显示</a></td>"; 
------解决方案--------------------
echo "<td><a href ='show_info.php?mac_eth={$row['mac_eth']}'>显示</a></td>"

echo "<td><a href ='show_info.php?mac_eth=$row[mac_eth]'>显示</a></td>"

要按规则来写
------解决方案--------------------
$_GET['mac_eth']