PHP Classes
elePHPant
Icontem

PHP Image MySQL PDO: Save and show image from MySQL blob using PDO

Recommend this page to a friend!
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2015-12-22 (10 months ago) RSS 2.0 feedNot enough user ratingsTotal: 560 This week: 4All time: 5,194 This week: 267Up
Version License PHP version Categories
image-db-pdo 0.2GNU General Publi...5PHP 5, Databases, Files and Folders
Description Author

This class can save and show image from MySQL blob using PDO.

It can take an image from a file or uploaded via a form and inserts a record in a given MySQL table using PDO prepared query pulling the file data into a BLOB field.

The class can execute a SELECT query to read a previously stored image file from the same database table and serves it as the current script output with a content type also stored in the same MySQL database table record.

Picture of mehrdad seifzadeh
  Performance   Level  
Name: mehrdad seifzadeh <contact>
Classes: 1 package by
Country: Iran Iran

  Files folder image Files  
File Role Description
Plain text file db_schema.sql Example sample table structure
Plain text file example.php Data main of example run to save(sample save form)
Plain text file example_save_image.php Example example of save image to database
Plain text file example_show_image.php Example example of show image
Plain text file img2db_pdo.class.php Class the main class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:560
This week:4
All time:5,194
This week:267Up