CHAPTER 7 Form & PHP. Introduction All of the following examples in this section will require two web pages. The first page retrieves information posted.

Slides:



Advertisements
Similar presentations
Dreamweaver Forms Overview. Forms – A Little Review Most user/webpage communication is one way, like this: Most user/webpage communication is one way,
Advertisements

Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
How to Make a Web Page: A Crash Course in HTML programming.
Computing Concepts Advanced HTML: Tables and Forms.
Personal Independent Networking Project HTML Forms by Chris Smith.
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Table, Forms, Metatags and Frames.
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
Forms. Form An HTML form is a section of a document containing normal content, special elements called controls (checkboxes, radio buttons, buttons, etc.),
 Definition of HTML Definition of HTML  Tags in HTML Tags in HTML  Creation of HTML document Creation of HTML document  Structure of HTML Structure.
ECA 228 Internet/Intranet Design I Forms. ECA 228 Internet/Intranet Design I Forms forms are a way for a user to communicate with you – text fields –
PHP and SQL Server: Queries IST2101. Project Report 4 SQL Queries Due Sunday, 4/5 at 11:59pm Instructions on how to access team webspace and SQL database.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
MS3304: Week 4 PHP & HTML Forms. Overview HTML Forms elements refresher Sending data to a script via an HTML form –The post vs. get methods –Name value.
Application Development Description and exemplification of server-side scripting language for server connection, database selection, execution of SQL queries.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
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.
HTML Forms What is a form.
CO1552 Web Application Development HTML Forms. Websites can be made more interactive by providing facilities for users to provide data To get user entered.
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
Lesson 13: Building Web Forms Introduction to Adobe Dreamweaver CS6 Adobe Certified Associate: Web Communication using Adobe Dreamweaver CS6.
CSE 382/ETE 334 Internet and Web Technology Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
 2001 Deitel & Associates, Inc. All rights reserved. 1 Chapter 12 – Microsoft FrontPage Express Outline 12.1Introduction 12.2Microsoft FrontPage Express.
DAT602 Database Application Development Lecture 14 HTML.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
10 Adding Interactivity to a Web Site Section 10.1 Define scripting Summarize interactivity design guidelines Identify scripting languages Compare common.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
HTML Hyper Text Markup Language It is used for describing web documents or web pages. A markup language is set of markup tags. HTML documents are described.
Web Design ATBs. ATB #1 List headings and size ATB #2 Define HTML.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
2.2 XHTML (cont.). Motto Yea, from the table of my memory I’ll wipe away all trivial fond records. —William Shakespeare.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
76 © 1998, 1999, 2000 David T. Gray, Howard Duncan, Jane Kernan Frames When displaying information in a browser, it is sometimes useful to divide the display.
HTML : Forms, Frames Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
ITCS373: Internet Technology Lecture 5: More HTML.
HTML and FORMS.  A form is an area that can contain form elements.  Form elements are elements that allow the user to enter information (like text fields,
HTML FORMS GET/POST METHODS. HTML FORMS HTML Forms HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes,
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Microsoft FrontPage 2003 Illustrated Complete Creating a Form.
FORMS. Forms are used to receive information from the web surfer, such as: their name, address, credit card, etc. Form fields are objects that allow.
HTML Forms. Slide 2 Forms (Introduction) The purpose of input forms Organizing forms with a and Using different element types to get user input A brief.
Forms Collecting Data CSS Class 5. Forms Create a form Add text box Add labels Add check boxes and radio buttons Build a drop-down list Group drop-down.
Introduction To HTML Form Inputs Written By George Gimian.
+ 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.
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Website Forms / Data Acquisition.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
HTML Creating Forms on a Web Page. 2 Objectives  Discuss the process of creating a form  Distinguish between data input controls and text input controls.
Week 10: HTML Forms HNDIT11062 – Web Development.
Basic Webpage Design HTML Forms. Objectives Learn how to use HTML to create a form. Explain the concept of forms Know the difference of GET and POST Discuss.
More HTML Images and Links. Links An anchor tag (a) is used to define a link, but you also need to add something to the anchor tag – the destination of.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
HTML FORM. Form HTML Forms are used to select different kinds of user input. HTML forms are used to pass data to a server. A form can contain input elements.
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.
Unit 4 Working with data. Form Element HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes, radio-buttons,
HTML Tables Tables are defined with the tag. A table is divided into rows (with the tag), and each row is divided into data cells (with the tag). td stands.
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
Dreamweaver - Forms questionnaire, register, login, etc.
Ashima Wadhwa Java Script And Forms. Introduction Forms: –One of the most common Web page elements used with JavaScript –Typical forms you may encounter.
Section 10.1 Define scripting
Creating and Processing Web Forms
Objectives Design a form Create a form Create text fields
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Section 10.1 YOU WILL LEARN TO… Define scripting
HTML Forms and User Input
Web Development Using ASP .NET
Introduction to HTML: Forms
Presentation transcript:

CHAPTER 7 Form & PHP

Introduction All of the following examples in this section will require two web pages. The first page retrieves information posted by the user, and the second sends the information from the web server and scripting engine back to the browser. The first web page doesn’t have to contain any PHP script at all. Second page contains PHP codes embedded in HTML codes.

Getting Data from Form An HTML form is a section of a document containing normal content, markup, special elements called controls (text field, checkboxes, radio buttons, drop down menu, text area), and labels on those controls. Users generally "complete" a form by modifying its controls (entering text, selecting menu items, etc.), before submitting the form to an agent for processing (e.g., to a Web server, to a mail server, etc.)

Getting Data from Form To create a form using a pure HTML web page: Opening and closing tags. ( …… ) Any controls such as text field, radio button etc that are placed between the tags, automatically become part of the form that is sent to the web server.

Getting Data from Form Method action tells the server which page to go to once the user has checked a submit button on the form Example: …………….

Getting Data from Form Attribute method controls the way that information is sent to the server There are two values for attribute method: get and post Example: or In this course, most of our examples use post.

Getting Data from Form Text Fields (text boxes) Text fields are created using element Setting type attribute to text

Getting Data from Form textfield.html Enter your name here : textfield.php My name is :

Getting Data from Form textfield.html textfield.php My name is hani

Getting Data from Form Text area use tag instead of tags because allow us to set the size and number of rows and columns of the control.

Getting Data from Form textarea.html what are your favourite html editor? ultra edit visul interdev note pad crimson editor

Getting Data from Form textarea.php My favourite HTML editor are:

Getting Data from Form textarea.html textarea.php My favourite HTML editor are :Ultra Edit Visual Interdev Note Pad Crimson Editor

Getting Data from Form Checkboxes Checkbox is counted as an individual entity. Users can have several checkboxes ticked altogether, or none checked at all. Checkboxes are created using tag, setting type attribute to checkbox. Each checkbox controls was named and set independently.

Getting Data from Form checkboxes.html have you ever use sybase before? Have you ever use oracle before? Have you ever use sql server before?

Getting Data from Form checkboxes.php <?php echo “$checkbox1 ”; echo “$checkbox2 ”; echo “$checkbox3 ”; ?>

Getting Data from Form checkboxes.html checkboxes.php Oracle SQLServer

Getting Data from Form Radio buttons Only one of the options / answers can be selected at a time. Radio buttons are created using tag, setting type attribute to radio. Each radio buttons has a same name.

Getting Data from Form radiobutton.html c language,object oriented(java).....can be considered as: networking programming language operating system

Getting Data from Form radiobutton.php <? php echo “you selected the answer :$radiobutton”; ?>

Getting Data from Form radiobutton.html radiobutton.php You selected the answer : Programming Language

Getting Data from Form Dropdown List boxes Dropdown list boxes are created using and tags. The tag that creates the list box encloses a number of tags. the tags each contain the text that corresponds to an item on the dropdown list.

Getting Data from Form listboxes.html what price of laptop are you looking to buy ? RM RM 3500 RM 3500-RM 4000 RM 4000-RM 4500

Getting Data from Form listbox.php <?php echo “Price Range : $price" ; ?>

Getting Data from Form listboxes.html listbox.php Price Range: RM RM 3500

Inserting Data from Form Into Database The next topic shows how to insert data from form into MySQL database. The form has all type of form controls and the complete codes are shown in form_complete.html. form_complete.html contains all HTML tags. form_dbase.php contains PHP codes that send the data from form into MySQL database.

Inserting Data from Form Into Database form_complete.html

Inserting Data from Form Into Database form_dbase.php

Inserting Data from Form Into Database form_complete.html

Inserting Data from Form Into Database Database content Table Database