ukscotth Posted July 19, 2009 Share Posted July 19, 2009 Hi, does anyone know how to display multiple blob images and resize them. So far all i can manage to do is show one image using this code : <?php include("include/configvb.inc.php"); header ("Content-type: image/jpeg"); $query = mysql_query("SELECT * FROM picture LIMIT 5"); $row = mysql_fetch_array($query); $logo = $row['filedata']; header('Content-type: image/jpg'); echo $logo; ?> Id like to be able to ddisplay them like this idealy : any help would be most appreciated Quote Link to comment Share on other sites More sharing options...
ukscotth Posted July 20, 2009 Author Share Posted July 20, 2009 any ideas anyone ? its drivin me mad Quote Link to comment Share on other sites More sharing options...
patrickmvi Posted July 20, 2009 Share Posted July 20, 2009 I'm not quite sure what you're trying to do there. Are you calling this script from another page or trying to load the image directly into an existing PHP page? You would need to probably make a script called "show_image.php" which you could then pass some get variables to that would identify what image you want to output. Then from wherever you're trying to display these images, you would put HTML IMG tags that would reference your script like this: <img src="show_image.php?img_id=123"> Quote Link to comment Share on other sites More sharing options...
ukscotth Posted July 20, 2009 Author Share Posted July 20, 2009 hi patrick. Thanks for your response. I dont need to call them from another page. I simply want to display 5 random images from the database. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.