izzytees Posted June 30, 2007 Share Posted June 30, 2007 For anyone out there that can solve this, I appreciate it well in advance. I'm sure it must be something simple, but it has got my head spinning. I also emailed the author of this code and posted this message on phpbuilder but have yet to hear back so I thought I'd expand my reach to users of this forum. Here is how I'm calling the image page: <img src="view_image.php?cattype=<?php echo $row_viewimages['cat_type']; ?>&id=<?php echo $row_viewimages['display_id']; ?>" width="110" height="110" border="0" alt="catalog"/> Here are sample issues: http://www.izzytees.com/viewcatalog.php http://www.izzytees.com Here is the view_image.php code: <?php // getdata.php3 - by Florian Dittmer <dittmer@gmx.net> // Example php script to demonstrate the direct passing of binary data // to the user. More infos at http://www.phpbuilder.com // Syntax: getdata.php3?id=<id> if($id) { $cat = $_REQUEST['cattype']; $id = $_REQUEST['id']; // you may have to modify login information for your database server: @MYSQL_CONNECT("xxx","xxx","xxx"); mysql_select_db("xxx"); $query = "select bin_data,filetype,display_id,cat_type from image_display where display_id='$id' AND cat_type='$cat'"; $result = @MYSQL_QUERY($query); $data = @MYSQL_RESULT($result,0,"bin_data"); $type = @MYSQL_RESULT($result,0,"filetype"); Header( "Content-type: $type"); echo ($data); }; ?> 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.