<?php
include 'inc/connect.php';
if ($_GET['id'] )
{
$p_id = $_GET["id"];
$query = "SELECT * FROM products WHERE p_id= '$p_id'";
//var_dump($query);
$resu = mysqli_query($con, $query);
while($rs = mysqli_fetch_assoc($resu))
{
?> <img src="<?php echo $p_id['p_image']; ?>" alt="" /> <?php
//var_dump($query);
}
}
?>
这是我的代码,这显示我的浏览器错误我该怎么办..? 图像无法加载
答案 0 :(得分:5)
替换此
<img src="<?php echo $rs['p_image']; ?>" alt="" />
到
<img src="<?php echo $p_id['p_image']; ?>" alt="" />