HTML, XHTML and CSS All-In-One for Dummies - Andy Harris [203]
1. Write an XHTML page as the framework.
This page is a regular XHTML page. Begin with the same XHTML framework you use for building your standard XHTML pages. You can use CSS styles, if you wish (but I’m leaving them out of this simple example).
Normally, you can create an XHTML document anywhere you want, but this is not so when your page will be working with PHP. This page is meant to be paired with a PHP document. PHP documents will run only if they are in a server’s file space, so you should save your XHTML document under htdocs to be sure it will call the PHP form correctly.
2. Set the form’s action property to point to a PHP program.
The form element has an attribute called action. The action attribute is used to determine which program should receive the data transmitted by the form. I want this data to be processed by a program called greetUser.php, so I set greetUser.php as the action: