Summary


This chapter started our work with HTML controls. You saw how to retrieve user data from a variety of user controls, such as text fields and text areas. Here's a summary of the salient points in this chapter:

  • In web forms, the ACTION attribute gives the URL that will handle the form data. You can omit this attribute, in which case it defaults to the URL of the current document.

  • In web forms, the METHOD attribute specifies the method or protocol for sending data to the target action URL.

  • In web forms, the TARGET attribute indicates a named frame for the browser to display the form results in.

  • To retrieve data from a web page, you can use the $_POST array with web pages that were sent with the POST method, $_GET for those sent with the GET method, and the $_REQUEST array, which holds the combined data of the $_POST and $_GET arrays. Just use the name of the control whose data you want as an index in these arrays.

  • To create an HTML text field in a form, use the <INPUT TYPE="TEXT"> element enclosed in an HTML <FORM> element.

  • Text areas act like multi-line text fields, and you create them with the HTML <TEXTAREA> element.

  • You can also use checkbox controls, which are created with the HTML <INPUT TYPE="CHECKBOX"> element.

  • You can create HTML listboxes with <SELECT> controls.

  • You create hidden controls with <INPUT NAME="Hidden" TYPE="HIDDEN" VALUE="data"> elements.

  • You create passwords with <INPUT NAME="Password" TYPE="PASSWORD"> elements.

  • To create image maps, you use the HTML <INPUT TYPE="IMAGE"> element.

  • To upload files, you have to use a multipart form, created with the HTML <FORM> element's ENCTYPE attribute. To do the uploading, use an HTML file control created with an <INPUT TYPE="file"> element.

  • You can create buttons with the <INPUT TYPE="BUTTON" VALUE="Button 1"> element.



    Spring Into PHP 5
    Spring Into PHP 5
    ISBN: 0131498622
    EAN: 2147483647
    Year: 2006
    Pages: 254

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net