Chapter 13. Cookies, Sign-Ins, and Ditching Crummy Pop-Ups
It’s time to start winding down. You’ve gone from seeing PHP as some strange, cryptic arrangement of angle brackets and dollar signs to building your own application, including integration with a MySQL database, authentication, redirection, and a decent set of utility functions. You might not be able to sell your modest application for a million dollars. But you should have a good sense of how to think in PHP, and how scripts are structured to solve problems.
Before you can twist and bend this application and your new skills to other purposes, there are still some lingering issues that you need to handle. A few of these are nice-to-haves; and some are downright necessities if you’re going to spend your career writing web applications.
Here are just a few things that you could give your application needs to round out both its usefulness and your skills:
A better login screen. Nobody likes a bland, gray pop-up dialog box; they want a branded, styled login form.
Better messaging to indicate whether a user is logged in.
A way to log out.
Two levels of authentication: one to get to the main application, and then administrator-level authentication to get to a page like show_users.php or delete_user.php.
Some basic navigation. That navigation should change based on a user’s login and the groups to which that user belongs.
These are mostly related to the idea of logging in, and that’s no accident. Whether it’s a good-looking login screen ...
Get PHP & MySQL: The Missing Manual, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.