Home arrow PHP arrow Page 2 - PHP 101 (Part 2) - Shakespeare's Rose

Form... - PHP

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.

TABLE OF CONTENTS:
  1. PHP 101 (Part 2) - Shakespeare's Rose
  2. Form...
  3. ...And Function
  4. Operating With Extreme Caution
  5. Shakespeare In The Matrix
  6. If Not This, Then What?
  7. Fortune Smiles
  8. Submitting To The King
  9. Miscellaneous Notes
By: Vikram Vaswani and Harish Kamath, (c) Melonfire
Rating: starstarstarstarstar / 11
August 08, 2000

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
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.

<html> <head> <basefont face="Arial"> </head> <body> <center> <form method="GET" action="login.php4"> <table cellspacing="5" cellpadding="5" border="0"> <tr> <td> <font size="-1">So what's your name?</font> </td> <td align="left"> <input type="text" name="name" size="10"> </td> </tr> <tr> <td colspan="2" align="center"> <input type="submit"> </td> </tr> </table> </form> </center> </body> </html>
The most critical line in this entire page is the <FORM> tag


<form method="GET" action="./login.php4"> ... </form>
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.

 
 
>>> More PHP Articles          >>> More By Vikram Vaswani and Harish Kamath, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: