Login   Register  
PHP Classes

File: adding.img.to.db.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ahmed Shreef  >  Shref Image in DB  >  adding.img.to.db.php  >  Download  
File: adding.img.to.db.php
Role: Example script
Content type: text/plain
Description: example on adding image to db
Class: Shref Image in DB
Store and retrieve binary files in a MySQL table
Author: By
Last change:
Date: 9 years ago
Size: 602 bytes


Class file image Download

//this example uses class  Shref_ImgInDb to save an image to data base

// 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

//added the image to the data base
//the image path : linux.jpg
//the table in data base that we will save the image in  : imageData
//the column where we will save the image : image