php-mysql tutorial

Designed By NISHANT GUPTA

  • Home
  • PHP
  • HTML
  • CSS
  • JavaScript
  • JQuery
  • Contact-us
  • Learn HTML

    • Introduction of HTML
    • Image Handling in HTML
    • List Handling in HTML
    • Font Handling in HTML
    • Table Handling in HTML
    • Form Handling in HTML
  • Learn CSS

    • Introduction of CSS
    • Styling Background in CSS
    • Styling Text in CSS
    • Styling Font in CSS
    • Styling Link in CSS
    • Styling List in CSS
    • Styling Table in CSS
    • Styling Div in CSS
    • Styling Span in CSS
    • Positioning in CSS
    • Display in CSS
  • Learn JavaScript

    • Introduction of JavaScript
    • Data Type in JavaScript
    • Variable in JavaScript
    • Oprator in JavaScript
    • Cond. Statement in JavaScript
    • Loop in JavaScript
    • Array in JavaScript
    • Function in JavaScript
    • Date in JavaScript
    • String in JavaScript
    • DOM in JavaScript
    • Event Handling in JavaScript
    • Form Handling in JavaScript
  • Learn PHP-MYSQL

    • Introduction of PHP
    • Decision Control in PHP
    • Loop in PHP
    • Array in PHP
    • Function in PHP
    • Form Handling in PHP
    • File Inclusion in PHP

File Inclusion in PHP!

Importance Of Form

  1. Form is the standard way using which a web application interacts with it’s users.
  2. A web application receives input from the user via form input.
  3. Handling form input is the cornerstone of a successful web application – everything else builds on it.

How Browser Passes Form Data

The browser interprets the HTML source for a

particular page:

– Result is a combination of text, images, and entry

fields

– Each entry field has a specific name

  1. User fills in these fields, (with potentially some

    client-side input checking via JavaScript) and

    then selects a submission button

  2. The browser reads the input fields, and creates

    a message that is sent to the server

– A series of name, value pairs

The “Form” tag

FORM attributes

– action

  1. URL of the resource that receives the filled-in form.
  2. This is the URL of our PHP code that receives the input.

– method

  1. Choices are “get” or “post”.

– enctype

  1. MIME type used to send results. By default is application/xww-form-urlencoded.
  2. Would use multipart/form-data if submitting a file (INPUT,

    type=file)

    <FORM action=“MyHandler.php” method=“post”>

What are “GET” and “POST” ?

  1. Whenever the browser  sends  an HTML form data to the server , it has to follow some mechanism of sending the data.
  2. Such mechanisms are called HTTP methods and the 2 most popular of them are GET and POST.
  3. Thus in short we can say that GET and POST are data sending methods used by browser .

Advertisements

 

©  2014 All Rights Reserved  •  Design by >Nishant Gupta.

Privacy Policy • Terms of Use