O'Reilly logo

PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition by Larry Ullman

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

Managing Files

The final segment of this Web application will manage files of any type. These scripts will allow users to upload files from their computers, which will then be stored on the server. The concept behind managing file uploads—as well as the very, very important preparation steps—was discussed in Chapter 11, “Extended Topics.” This application will expand upon that basic demonstration by

  • Storing the file’s information in the database

  • Renaming the file

  • Providing a method of downloading the files

  • Placing the files outside of the Web root directory, for improved security

In order to use these scripts, you’ll need to do two things. First, create the uploads table (if you haven’t already), using this SQL command (Figure 12.21).

Figure 12.21. ...

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