Blog Archives

Display image from mysql in php


<?php header(“content-type:image/jpg”); //include main.php; $id = $_GET[“id_level”]; $con=mysql_connect(“localhost”,”name”,””)or die(“cant connect to mysql”); mysql_select_db(“pramodh”); $query = “SELECT IMAGE FROM reg WHERE id_level=’$id'”or die (mysql_error()); $result = mysql_query($query); $row = mysql_fetch_array($result,0); ECHO “$row[IMAGE]”; ?>

Tagged with: , , , ,
Posted in Display image from mysql in php, php
Follow php tutorial on WordPress.com
categories
Calendar
July 2017
M T W T F S S
« Sep    
 12
3456789
10111213141516
17181920212223
24252627282930
31  
Follow me on Twitter
Blog Stats
  • 74,622 hits