Presentation is loading. Please wait.

Presentation is loading. Please wait.

Form Data (part 1) MIS3501 Jeremy Shafer Department of MIS

Similar presentations


Presentation on theme: "Form Data (part 1) MIS3501 Jeremy Shafer Department of MIS"— Presentation transcript:

1 Form Data (part 1) MIS3501 Jeremy Shafer Department of MIS
Fox School of Business Temple University

2 Course Overview We are here!!! To do: MySQL
2 Weeks HTML & CSS 2 Weeks PHP 3 Weeks PDO 2 weeks To do: Organize your code with MVC (1 week) Work with forms (1 week) Use cookies and sessions (1 week)

3 Objectives (this class and next)
Use text boxes, password boxes, radio buttons, check boxes, drop-down lists, list boxes, and text areas to get input from the user. Use hidden fields to pass data to the web application when a form is submitted. Use the htmlspecialchars and nl2br functions to display user entries the way you want them displayed.

4 Warm up – some things we’ve seen before…

5

6

7 Radio buttons

8 When we have a collection of form elements that are logically grouped together, we may used a <fieldset> tag. Putting the input tags inside of <fieldset> </fieldset> does this and results in forms that are more intuitive to use. Notice how the name ‘card_type’ has been used here. The same name was used three times. Why??

9

10 Check Boxes

11 Notice that here, the names are different
Notice that here, the names are different. We need a way of distinguishing one check box from another. Next class, we’ll look at an alternate approach to dealing with multiple check boxes… There’s a new feature of PHP that allows use treat multiple check boxes as an array… We’ll address that on Thursday

12 Text Areas Hear ye, Hear ye …

13 Note the use of “rows” and “cols” here.

14

15 Free text input is unpredictable
Free text input is unpredictable! It is advisable to clear it up with the htmlspecialchars function.

16 nl2br Users are also prone to put line breaks (that is, carriage returns) in text areas. If you want to translate those line breaks to HTML break tags… PHP has a function for that exact purpose. The name nl2br means…. New Line 2 Break. LOL. Isn’t that way 2 cool?

17

18 Time for an experiment…


Download ppt "Form Data (part 1) MIS3501 Jeremy Shafer Department of MIS"

Similar presentations


Ads by Google