

UNDER THE HOOD: Permanent Data Is Really Semi-PermanentĮven though databases store your information, and that storage lasts beyond your computer or even a database starting up and shutting down, your information is still not really permanent.

(At times, though, even permanent information can be lost see the box that follows for advice on backing up your information in such cases.) In programmer jargon, this is called persisting your information. Therefore, a good database needs to store information more permanently. Do you think your users would come back to your site if they repeatedly had to type everything in again? Not a chance. Imagine if every time your web server had to be shut down for an upgrade, your database lost every user’s first name, last name, and email address. If your program stops running, or your entire web server has to be restarted, a database doesn’t lose your information. That’s not very helpful.Ī good database provides long-term storage for your information. For one thing, arrays and their contents in PHP are lost every time your program stops and starts again. An array might function as a database in a simplistic sense, but it won’t serve your needs for long. You’ve already seen that PHP gives you arrays ( The $_REQUEST Variable Is an Array) that serve as a sort of programmer’s file cabinet.
