PhpRiot
Download This Article
Download this article in PDF format with all listings and files.

Price: $5.00 AUD
(Approx. $3.25 USD)

More information
Buy Me A Coffee

Your support keeps me writing — let me know if you want your name listed here also.
Related Books
PHP and MySQL Web Development

PHP and MySQL Web Development

An intermediate to advanced guide to PHP and MySQL, the free, open-sourced Web development...

Learning PHP, MySQL, and JavaScript: A Step-By-Step Guide to Creating Dynamic Websites (Animal Guide)

Learning PHP, MySQL, and JavaScript: A Step-By-Step Guide to Creating Dynamic Websites (Animal Guide)

If you know HTML, this guide will have you building interactive websites quickly. You'll learn...
Browse Articles
Ajax (4), APC (1), CAPTCHA (1), CSS (3), Debugging (1), File Upload (1), Google (3), Google Maps (2), JavaScript (12), JSON (2), MVC (1), MySQL (7), onbeforeunload (1), OOP (1), PHP (33), PhpDoc (1), PostgreSQL (6), Prototype (11), Reflection (1), RFC 1867 (1), Robots (1), Scriptaculous (1), SEO (1), Sessions (2), SimpleXML (1), Smarty (5), SOAP (2), SPL (1), Templates (2), W3C (1), XHTML (1), Zend Framework (6), Zend_Loader (1), Zend_Registry (1), Zend_Search_Lucene (1)

PhpRiot Newsletter
Your Email Address:

Storing Images In MySQL

Introduction

This article is an introduction to using the blob column type in MySQL. The concept is introduced by familiarising users with uploading and storing images in a MySQL table.

Definitely a controversial topic in PHP-land, but at least knowing how to do it will help you make a decision on whether or not it’s for you.

The article covers the following:

  • Isn’t this a bad idea?
  • What is a BLOB?
  • Creating an image table
  • The upload form
  • Uploading the image
  • The upload() function
  • Display an image from the database
  • Displaying all the information

This article was originally published at http://phpro.org, and is reproduced on PhpRiot with permission of the author, Kevin Waterson.

In This Article


Tagged in ,

Article History

May 30, 2005
Initial article version
Jan 18, 2008
Updated listing 5 to not include non-existent conf.php