javascript - enlarge image on click and show them in new page

one text

Solution:

I elaborate a little on what @CBroe commented. At the moment you're retrieving the URLs to the full-size images from your database and generating a html table where each image is rendered at a fixed size of 100x100.

echo '<tr> <td > < a href = "annotazione.php" > < img src = "immagini/'.$row['vial_image'].'" style = "width:100px; height:100px; position: relative; top: 70px;" > < /a></td></tr>';

As you already have the correct URL, everything you have to do is open this URL inside the current browser window as soon as the user clicks on the thumbnail. Catching the click event can be done by adding an onclick="window.open(this.src)" handler to the <img> element. e.g.

echo '<tr> <td> <a href = "annotazione.php" > <img onclick="window.open(this.src)" src = "immagini/'.$row['vial_image'].'" style = "width:100px; height:100px; position: relative; top: 70px;"> </a></td></tr>';

Source