Use with php

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Use with php

Necdet
Hi friends, I want to do something as follows. Can you help?

 a href="images.php?type=medium&id=1" rel="shadowbox">My Image</a

images.php database file to be captured photos.


---
images.php
----

function medium(){
global $prefix;
 header('Content-type: image/jpeg');
if (isset ($_GET['id'])) { $id=$_GET['id']; }
else { $id=0; }

                $imagesP = mysql_fetch_array(mysql_query("SELECT id,imagesURL FROM ".$prefix."_imagestable WHERE id='$id'"));
                $medium = $imagesP ['imagesURL '];
                echo @file_get_contents("images/medium/".$medium);

}


---
Reply | Threaded
Open this post in threaded view
|

Re: Use with php

rp1428
You could do away with the images.php file and put the php code in the calling file. Then output the image name as the href.