Now that you've got the basics of PHP variables and operators down, the second article in this series takes a look at PHP's form-processing capabilities, and introduces you to the comparison and logical operators and the "if-else" and "switch" family of conditional statements.
Forms have always been one of quickest and easiest ways to add interactivity to your Web site. A form allows you to ask customers if they like your products, casual visitors for comments on your site, and pretty girls for their phone numbers. And PHP can simplify the task of processing the data generated from a Web-based form substantially - as our first example demonstrates.
As you probably already know, the ACTION attribute of the
<FORM> tag specifies the name of the server-side script - "login.php4" in this case - that will process the information entered into the form, while the METHOD attribute specifies the manner in which the information will be passed.