O'Reilly logo

PHP for Absolute Beginners by Jason Lengstorf, Thomas Blom Hansen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 4

image

Building a Dynamic Image Gallery with Image Upload

You know how to make a simple dynamic web site. You know how to write a form. You know how to access URL variables with $_GET or $_POST. I say it’s time to put your new knowledge to good use. Let’s build a dynamic image gallery with a form to allow users to upload new images to the gallery. In the process, you will learn quite a bit.

  • Set up a dynamic site.
  • Write named functions.
  • Use $_GET and $_POST superglobal arrays.
  • Iterate with a while loop.
  • Use PHP’s native DirectoryIterator class.
  • Write custom object methods.
  • Upload files with PHP’s $_FILES superglobal array.
  • Plan and code a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required