<?php
$result = $conn->query("SELECT * FROM adoption;");
if($result->num_rows !=NULL){
while($rows = $result->fetch_assoc()){
$AAnimalName = $rows['AAnimalName'];
$Abreed = $rows['Abreed'];
$Asex = $rows['Asex'];
$Acolor = $rows['Acolor'];
$image = $rows ['image'];
$image_location = "admin/function/upload/".$image; ?>
<div class="container-custom1">
<?php
if(file_exists($image_location )) {
echo '<img src="'.$image_location.'" width = "248" height="190" class="age1" title>';
}
else {
echo '<img src="admin/images/admin_logo.png" width="248" height="190" class="age1" title>'; } ?>
<?php echo "<i><h1 class='junction'><a style='cursor:pointer' class='junction'>".$AAnimalName."</a></h1></i>"."<br>".$Asex." / ".$Abreed."<br>".$Acolor."<br>"?></div>
<?php
} }
?>
!http://imgur.com/zxXAcFF先看图片。如何添加链接,以获得有关div=container-custom
答案 0 :(得分:0)
将href添加到现有锚标记中。如果您已经有更多详细信息的路由设置页面只是在href中输出该路由或动态构建一个例如
#stored route in db
$url = $rows['url'];
...href="{$url}"...
或
#using ids from db
$id = $rows['id'];
...href="/path/to/details/{$id}"...