duxbuz Posted January 20, 2010 Share Posted January 20, 2010 Hi, Am looking for help with displaying image in webpage, that is also a http link. I managed to display the images with a 2 script thing like this:- <?php while($row = mysql_fetch_array($result)) { ?> <p class="style2"><img src="getyeargrps.php?fileId=<?php echo $row["id"]; ?>" alt="" /></p> <p class="style2"> </p><?php }; ?> which calls a seperate file that handles the mime part. But i wanted to display another ROW like $rol["link"] with the link details in like: <a href="downloadfile.php?fileId=<?php echo $row["id"]; ?>" But didint want to need another seperate file. Seems the mime thig is a problem. Hope people can follow this poor explanation. This text box is awful to type in it wont scroll down. Link to comment https://forums.phpfreaks.com/topic/189154-php-mysql-display-image-as-web-link/ Share on other sites More sharing options...
Buddski Posted January 20, 2010 Share Posted January 20, 2010 Why dont you just use the same file for downloading and outputting.. If you want to download just add another GET var to your URL like download=true if that is set it can start the downloading process if its not set it displays it for img tags. Link to comment https://forums.phpfreaks.com/topic/189154-php-mysql-display-image-as-web-link/#findComment-998695 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.