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
May 2017
M T W T F S S
« Sep    
1234567
891011121314
15161718192021
22232425262728
293031  
Follow me on Twitter
Blog Stats
  • 73,826 hits