PHP: Forms FdSc Module 109 Server side scripting and Database design

Slides:



Advertisements
Similar presentations
>> Introduction to HTML: Forms. Introduction to HTML 5 Important HTML Tags HTML tags and attributes Images Hyperlinks Lists –{ordered | unordered | definition}
Advertisements

HTML and Forms Please use the speaker notes to receive the comments accompanying the slides!
Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
Creating Web Page Forms. Objectives Describe how Web forms can interact with a server-based program Insert a form into a Web page Create and format a.
Forms Review. 2 Using Forms tag  Contains the form elements on a web page  Container tag tag  Configures a variety of form elements including text.
Form Basics CS Web Data  Most interesting web pages revolve around data  examples: Google, IMDB, Digg, Facebook, YouTube, Rotten Tomatoes  can.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
4-Sep-15 HTML Forms Mrs. Goins Web Design Class. Parts of a Web Form A Form is an area that can contain Form Control/Elements. Each piece of information.
XP Tutorial 6New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Creating Web Page Forms Designing a Product Registration Form Tutorial.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
HTML Forms.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
Week 9 - Form Basics Key Concepts 1. 1.Describe common uses of forms on web pages 2.Create forms on web pages using the form, input, textarea, and select.
1 Form Elements  Form elements have properties: Text boxes, Password boxes, Checkboxes, Option(Radio) buttons, Submit, Reset, File, Hidden and Image.
Creating Web Page Forms. Introducing Web Forms Web forms collect information from users Web forms include different control elements including: –Input.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
1 Review of Form Elements. 2 The tag Used in between tags.  Form elements(text control, buttons, etc.. ) goes here. OR  Form elements(text control,
SYST Web Technologies SYST Web Technologies XHTML Forms.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Page Design Forms! Website Design. Objectives What forms can do The Attributes of the form tag Using Textboxes Textareas Checkboxes Radio buttons.
+ FORMS HTML forms are used to pass data to a server. begins and ends a form Forms are made up of input elements Every input element has a name and value.
HTML FORMS The TEXT Object Presented By: Ankit Gupta.
Project 6 Creating Forms on a Web Page. Objectives Define terms related to forms Describe the different form controls and their uses Use the tag Create.
Creating Web Page Forms COE 201- Computer Proficiency.
HTML Form Inputs. Creating a basic form …content goes here…
HTML Forms.
Week 10: HTML Forms HNDIT11062 – Web Development.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 6: Creating XHTML Forms Kelly.
1 HTML forms (cont.)
Lesson 5 Introduction to HTML Forms. Lesson 5 Forms A form is an area that can contain form elements. Form elements are elements that allow the user to.
HTML Structure II (Form) WEEK 2.2. Contents Table Form.
Ashima Wadhwa Java Script And Forms. Introduction Forms: –One of the most common Web page elements used with JavaScript –Typical forms you may encounter.
XP Tutorial 6New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
Tutorial 6 Working with Web Forms
Client-Side Internet and Web Programming
Making your HTML Page Interactive
How to Write Web Forms By Mimi Opkins.
Forms Web Design Ms. Olifer.
FORMS IN HTML.
Introduction to Web programming
ITE 115 Creating Web Page Forms
Web Programming– UFCFB Lecture 10
Getting User Input with Forms
النماذج عند الانتهاء من هذا الدرس ستكون قادرا على:
Designing Forms Lesson 10.
1.5 FORMS.
HTML: Basic Tags & Form Tags
Creating Form Elements
Creating Form Elements
Web Development & Design Foundations with H T M L 5
Forms Data Entry and Capture
FORM OBJECT When creating an interactive web site for the Internet it is necessary to capture user input and process this input. Based on the result of.
CNIT 131 HTML5 - Forms.
Web Development & Design Foundations with H T M L 5
HTML Forms Internet Technology.
PHP: Combo box FdSc Module 109 Server side scripting and
Creating Forms on a Web Page
Basics of Web Design Chapter 10 Form Basics Key Concepts
HTML Forms 18-Apr-19.
© Hugh McCabe 2000 Web Authoring Lecture 8
Lesson 6: Web Forms.
Making your HTML Page Interactive
Unit 5 Create Forms.
HTML: Basic Tags & Form Tags
Presentation transcript:

PHP: Forms FdSc Module 109 Server side scripting and Database design 2011

Format From now on I will not be giving you complete worked examples There will be “snippets” - Snippet is a programming term for a small region of re- usable source code (Wikipedia) It will be up to you to incorporate these into worked examples of your own

Input boxes Forename <INPUT TYPE='text' SIZE=20 MAXLENGTH=30 NAME='firstname'> Parameter Details TYPE Specifies the type of input control (Password – will blank input) SIZE Textbox size on form MAXLENGTH Number of characters allowed in the textbox NAME Input box name used to gather data

Radio buttons <INPUT TYPE='radio' NAME=‘sex' VALUE=male' CHECKED> > Parameter Details TYPE Specifies the type of input control VALUE Value returned if radio button is checked CHECKED Optional parameter – sets the default button NAME Input box name used to gather data

Radio buttons <form> <input type="radio" name="sex" value="male" /> Male<br /> <input type="radio" name="sex" value="female" /> Female </form> Radio buttons let a user select ONLY ONE of a limited number of choices Set each Radio Button to same name to group radio buttons Form tags must be used around each set of buttons, or else only one button on the whole page will be allowed to be set

Check boxes <INPUT TYPE='checkbox' NAME='course' VALUE='ITP L3' CHECKED> Parameter Details TYPE Specifies the type of input control VALUE Value returned if check box is ticked CHECKED Optional parameter – sets the default tick NAME Input box name used to gather data

Check boxes <form> <input type="checkbox" name=“genre" value=“fiction" /> Fiction <br /> <input type="checkbox" name=“genre" value=“biography" /> Biography </form> Check boxes let a user select ONE or MORE of a limited number of choices Set each check box to the same name to group them

Select boxes <SELECT NAME='names' MULTIPLE> <OPTION VALUE='' SELECTED> Mike Jones</OPTION> <OPTION VALUE=''> Tom White</OPTION> </SELECT> Parameter Details NAME Input box name used to gather data SIZE Number of items initially shown SELECTED Default selection on load OPTION An item in the list MULTIPLE Allows selection of more than one option VALUE Data used when item selected

Select boxes <SELECT NAME="Residence" SIZE="1"> <OPTION SELECTED>Flat <OPTION>End terrace <OPTION>Terraced <OPTION>Semi <OPTION>Detached </SELECT> <SELECT NAME=“Laptop" MULTIPLE SIZE="4"> <OPTION SELECTED>Dual core <OPTION>Hard drive <OPTION SELECTED>SSD <OPTION>BlueRay <OPTION>LED backlight <OPTION SELECTED>USB 3.0 </SELECT>

Text box <TEXTAREA NAME="Comments" ROWS="6" COLS="50">Add your comments here please</TEXTAREA> Parameter Details NAME Input box name used to gather data OPTIONAL TEXT Appears inside the box ROWS Number of visible rows in the box. Exceeding this amount introduces a vertical scroll bar. COLS Number of characters that can be typed before a new line is begun

Clear form Clears the form entries <INPUT TYPE='reset' VALUE='Clear form'> If a value is not specified, the default is “Reset”

Submitting a form All forms need a submit button to send the data to the server <INPUT TYPE='submit' VALUE='Place order'> If a value is not specified, the default is “Submit”

Classroom example Create a form using all the data types described The form can be one you will use in your project (create a ticket maybe) Echo the submitted data back to the client Position the returned data in a table Add the date (using PHP) in UK format Add a back button to return to the input page and a confirm button (to write data to MySQL) Demonstrate it working