Hi I'm learning basic php. I created simple quick kart project in php. My product details are coming from database. I did it. Now i want to popup my image which is from database. Here i'm pasting my code of displaying image.
<?php echo "<a href='admin/image/".$prdrow['image']."'>";?>
<?php echo "<img alt='sri lakshmi cracker' class='img-fluid' src='admin/image/".$prdrow['image']."'>";?>
CodePudding user response:
This topic already discussed many times here in Stackoverflow,
You can find your needed solution on many references here:
how to popup image over the screen after clicking the image
open new popup with image, after click link inside magnific popup
How to display a popup after clicking an image
CodePudding user response:
You can either add target="_blank"
to your <a>
html tag to oben the your image in a new browser tab: https://www.w3schools.com/tags/att_a_target.asp
Other than that image popups are done via JavaScript and/or CSS, not PHP. Have a look: https://www.w3schools.com/howto/howto_css_modal_images.asp