mypage.php?imagenumer

Currently my images are stored on my web server under ./gags/
My index page displays top 10 newest images uploaded.

I also made a page called gag.php, I want to display my images here by their id.
Example:

./gags/1.jpeg ----> gag.php?1.jpeg
Their ID come from a MySQL table.
What I mean is the gag.php will display different images depending on their value.
Ex: gags/1.jpeg will be displayed on gag.php?15.jpeg, 2.jpeg on ?2.jpeg and so on.

If you wonder why I want it, it is because I have a html setup with advertisement etc.
Anyone know how to do this ?

Hi,
first use a while loop on your page to loop all your images into html so that when the image is clicked (thinking you want it to link to the gag.php?image1.php) then have the link as <a href=“gag.php?i=’.$imagename.’”) then on the gag.php use the $i = $_GET[‘i’]; and then use the hope this helps a little

Sponsor our Newsletter | Privacy Policy | Terms of Service