<?php
//this example uses class Shref_ImgInDb to get an image from data base
//and print it to the screen
// first we included the class in the file
require_once "Shref.ImgInDb.class.php" ;
//then created a new object
$Shref = new Shref_ImgInDb() ;
//**conected to the data base
// user : root
// pass :
// db name : test
$Shref->conDb("root","","test");
//**geting the image from the data base
//the table in data base that images are saved in : imageData
//the column where the images are saved in : image
//the column name of the primaryKey of that table : id
//the image id number in the table
$Shref->getImage("imageData", "image", "id",1);
//printing the image to the screen
$Shref->showImage();
?>
|