i am trying to fetch all images which is store in my mysql database this is my code but not able to fetch please help
Code:
<?php mysql_connect("localhost", "root", "") or die("Can not connect to database: ".mysql_error()); mysql_select_db('brightweb') or die("Can not select the database: ".mysql_error()); $sql = "select * from portfolio"; // the result of the query $result = mysql_query($sql) or die("Invalid query: " .mysql_error()); // Header for the image while ($rows = mysql_fetch_array($result)) header('Content-type: image/jpg'); echo $row['image']; ?>
Comment