How view image from database by using php -
I am using the local host I insert the image into the database blob I am trying to show the image but I failed I do not show the image Three fields in the database are id, name, image . This code is trying. uimage.php and index.php page: But the picture was not shown. Crypto help me. The simplest type of images to handle images in PHP-based websites is to save images:
& lt; Php mysql_connect ("localhost", "root", ""); Mysql_select_db ("task_database"); $ Image = mysql_query ("Choose Image WHERE ID = 1"); $ Image = mysql_fetch_assoc ($ image); $ Image = $ image ['image']; Header ("Content-Type: Image / JPEG"); Echo $ image; ? & Gt; Use this code in the
"Uploaded Image" echo & Lt; P / & gt; Your image: & lt; P / & gt; & Lt; Img src = uimage.php & gt; ";
Comments
Post a Comment