| You actually would want to use a database for something like this, or if it is just a per user basis, a cookie.
PHP doesn't have built in memory without using one of these options. You could use the file functions, but those functions lock the text file so noone else can read/write to that text file until the lock is released. This isn't an issue for small apps that only one person is likely to use at a time, but for web apps that multiple users can be on concurrently, it becomes an issue. Even if the lock is only for a moment, as more users are on the site the likelihood of it being locked when someone else is trying to use it will increase. |