php page showing image from mysql db that links to other page

A

Anonymous

Guest
help. I hope sombody can help me. i have i index.php page showing a db mysql data with images. i need that the images of the index.php liks to another page detail.php. here is the code thath i have, but idon't know how to continue. can anybody help me please????

Code:
<?php
require_once 'dbconfig.php';
?>
<style type="text/css">

</style>
</head>
<body>
<div class="container"><br />
<div class="row">
<?php	
$stmt = $DB_con->prepare('SELECT userID, userLink, userPrice, userAddress, userPic FROM tbl_users ORDER BY userID DESC');
$stmt->execute();

if($stmt->rowCount() > 0)
{
while($row=$stmt->fetch(PDO::FETCH_ASSOC))
{
extract($row);
?>
<div class="col-xs-3">
<p class="page-header"> </p>
<?php echo"<a href='detail.php?userId=userID'</a>";?>
<p><img src="user_images/<?php echo $row['userPic']; ?>" class="img-rounded" width="220px" height="180px" />	</p>
<p><span class="page-header"><?php echo $userPrice." / ".$userAddress; ?></span></p>
</div> 
<?php
}
}
else
{
?>
<?php
}	
?>
</div>
</div>
</body>
</html>
thanks
 
just adda link around the image

Code:
<a href="detais.php">...</a>
 
Back
Top