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

  & 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   

and index.php page:

  "Uploaded Image" echo & Lt; P / & gt; Your image: & lt; P / & gt; & Lt; Img src = uimage.php & gt; ";   

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:



Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -