My code works good so far, but I want to make each table cell clickable where the real image opens by clicking on it. How do I do that?
echo "<table>";
$res = "SELECT * FROM table1";
$result = $mysqli->query($res);
while($myRow = $result->fetch_array())
{
echo "<tr>";
echo "<td>";?> <img src=" <?php echo $myRow["image"]; ?>" height="100" width="100"><?php echo "</td>";
echo "</tr>";
}
echo "</table>"
Just wrap the small image in <a>
tags
<a href="http://path_to_images/<?=$myRow["image"]?>">
<img src="<?php echo $myRow["image"]; ?>" height="100" width="100">
</a>
echo "<td>";?>
"<a href=" <?=$myRow["image"]; ?>">
<img src=" <?php echo $myRow["image"]; ?>" height="100" width="100" \>"<?php echo "
<a/>
</td>";
Just put <a href=""><a>
outside the img?