Presentation is loading. Please wait.

Presentation is loading. Please wait.

Slide 1 CMPS 211 Internet Programming Spring 2008 Forms Chapter 17 4/22/08.

Similar presentations


Presentation on theme: "Slide 1 CMPS 211 Internet Programming Spring 2008 Forms Chapter 17 4/22/08."— Presentation transcript:

1 Slide 1 CMPS 211 Internet Programming Spring 2008 Forms Chapter 17 4/22/08

2 Slide 2 CMPS 211 Internet Programming Spring 2008 Forms Forms have three parts: The tag The actual FORM elements where the visitor enters information Submit button (or active image) that sends the collected information to the server.

3 Slide 3 CMPS 211 Internet Programming Spring 2008

4 Slide 4 CMPS 211 Internet Programming Spring 2008 Processing forms Forms gather information from a visitor A script processes the information PHP is a popular script language –Easy to learn –Designed for processing info obtained on the web –Can be written right in the file with the (X)HTML –Hundreds of functions available

5 Slide 5 CMPS 211 Internet Programming Spring 2008 Alternative to processing Send data via email using: Emailform.php is a script that sends the data to your email Figure 17.6 is such a script and is available on the text website

6 Slide 6 CMPS 211 Internet Programming Spring 2008 Grouping form elements Personal Information Suggestions

7 Slide 7 CMPS 211 Internet Programming Spring 2008 Form elements Text boxes Password boxes Radio buttons Menus Check boxes Large text boxes Hidden fields Submit button Image to submit Disabling elements Keeping elements from being changed

8 Slide 8 CMPS 211 Internet Programming Spring 2008 Text Boxes Personal information Name: Address: Enter password: Style rule: p.legend {backgrouond:#DED983; color:black; border:2px outset #DED983; padding:.2em.3em; font-size: 1.2em; position:relative; margin: 1em 0 -1em 1em; width: 10em;}

9 Slide 9 CMPS 211 Internet Programming Spring 2008 Radio Buttons Size: King Queen Twin Single Style Rules: #choices label{position: absolute; padding-top:.2em; left: 20px} #size{font-size: 90%} Input {margin-left: 9em;} Input+input{margin-left: 1em;} Br+input{margin-left:9em;}

10 Slide 10 CMPS 211 Internet Programming Spring 2008 Menus Type of wood: Mahogany Maplewood Pine Cherry Can also group options using the tag

11 Slide 11 CMPS 211 Internet Programming Spring 2008 Other fields Checkboxes – like radio buttons but allow multiple selections Larger text area – upto 32,700 characters, need to provide rows & columns Upload files – provide URL of file to upload; need script to process Hidden Fields Submit button – special button to signify input complete, perform action Reset button – Erase all input and start over


Download ppt "Slide 1 CMPS 211 Internet Programming Spring 2008 Forms Chapter 17 4/22/08."

Similar presentations


Ads by Google