bijuideamine Posted December 22, 2011 Share Posted December 22, 2011 <? include_once ("../includes/config.php"); include_once "../includes/dbconnect.php"; header("Content-type: image/jpeg"); $id = $_REQUEST['id']; $sql="SELECT product_image FROM tbl_product WHERE product_id='$id' "; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) { $image= $row['product_image']; $image=imagecreatefromstring($image); $out=ImagejpeG($image); print ($out); }?> Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted December 22, 2011 Share Posted December 22, 2011 When posting code, enclose it within the forum's . . . BBCode tags. In what way is that code "not working"? Quote Link to comment Share on other sites More sharing options...
SergeiSS Posted December 22, 2011 Share Posted December 22, 2011 Try this, maybe it helps // change this line $out=ImagejpeG($image); // to this line imagejpeg($image); // delete or comment the next line print ($out); And in any case you'd better say what is (was) wrong. 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.