CHAPTER 11A Dynamic Image Gallery

So far, the web application we have developed restricts users to only publishing text-based information in their blogs. While we have allowed users a degree of control by permitting a limited subset of HTML to be used (including the use of the <img> tag), users are still unable to upload their own images. In this chapter, we will extend the functionality of our blogging system to allow users to upload one or more photos to each of their blog posts.

While this may sound like a fairly trivial process, there are a number of different issues to consider, such as these:

  • Storage of images. We must store the images on the server and link them to blog posts.
  • Sending images to browsers. When a user views posts with ...

Get Practical Web 2.0 Applications with PHP now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.