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
March 2017
M T W T F S S
« Sep    
 12345
6789101112
13141516171819
20212223242526
2728293031  
Follow me on Twitter
Blog Stats
  • 72,827 hits