DAY 08 | PHP AND MYSQL | VI SEM | B.CA | FORM HANDLING | L2

Vidhyaashram
6 Mar 202427:24

Summary

TLDRThis educational video script delves into the fundamentals of form handling in PHP, a server-side scripting language. It explains the role of HTML forms in collecting user inputs and the importance of form elements like text boxes, checkboxes, and submit buttons. The script covers the GET and POST methods for data submission, emphasizing form validation, sanitization, and storage. It also touches on object-oriented programming concepts like classes and inheritance, setting the stage for a deeper exploration of PHP's capabilities in database handling.

Takeaways

  • 😀 Forms are essential in web development for collecting user input and allowing users to interact with websites.
  • 🔒 PHP forms play a critical role in applications such as contact forms, registration forms, and login forms, especially when sensitive information is involved.
  • 📝 HTTP stands for Hypertext Transfer Protocol, which is used for communication between the client and the server.
  • 🔑 The GET method in forms is used to request data from a specific source, with the data being visible in the URL.
  • 🔍 The POST method in forms is used to submit data to a specific source, keeping the data invisible to the user in the URL.
  • 📥 PHP offers various functions and features for form processing, including form validation, sanitization, and data storage.
  • 📝 HTML forms are used to send user information, and PHP can embed within HTML to collect this information.
  • 🔄 Form controls like text boxes, text areas, dropdowns, radio buttons, checkboxes, and buttons are used to design interactive forms.
  • 🔑 The 'action' attribute in a form tag specifies the URL to which the form data will be sent for processing.
  • 🔄 The 'method' attribute in a form tag determines how the form data is sent, either using GET or POST.
  • 🔒 Form validation is crucial for ensuring that the input meets certain criteria before being processed, like checking for uppercase, lowercase, digits, and special symbols in a password.

Q & A

  • What is the primary function of a form in web development?

    -The primary function of a form in web development is to collect user input and allow the user to submit the data to a server for processing.

  • What does HTTP stand for and what is its role in communication between a client and a server?

    -HTTP stands for Hypertext Transfer Protocol, and it is used to enable communication between a client and a server by acting as a request-response protocol.

  • What are the two methods available in HTML forms for sending data to a server?

    -The two methods available in HTML forms for sending data to a server are GET and POST.

  • What is the difference between using the GET method and the POST method in a form?

    -The GET method sends data in the URL string, making it visible to the user, while the POST method sends data invisibly to the user, not appearing in the URL.

  • What is the purpose of form validation in PHP?

    -Form validation in PHP is used to verify the correctness and security of the data submitted by the user, ensuring that it meets certain rules and standards before processing.

  • Can you explain the concept of inheritance in object-oriented programming as mentioned in the script?

    -Inheritance in object-oriented programming is a feature that allows the creation of a new class from an existing one, enabling code reuse and establishing a relationship between classes.

  • What is the role of the 'action' attribute in an HTML form tag?

    -The 'action' attribute in an HTML form tag specifies the URL of the web page that will process the form data upon submission.

  • What is a text box in a form used for?

    -A text box in a form is used to allow the user to provide a single line of input, such as entering a name or a search query.

  • What is the purpose of the 'required' attribute in an input field within a form?

    -The 'required' attribute in an input field within a form specifies that the field must be filled out before the form can be submitted, ensuring that necessary information is provided by the user.

  • What is the difference between a radio button and a checkbox in a form?

    -A radio button allows the user to select only one option from a group, while a checkbox allows the user to select multiple options from a group.

  • How does a submit button function in a form?

    -A submit button in a form triggers the submission of the form data to the server for processing when clicked by the user.

Outlines

00:00

📝 Introduction to Form Handling in PHP

The first paragraph introduces the concept of form handling in PHP, emphasizing the importance of forms in web development for collecting user input. It discusses the role of HTTP in client-server communication and HTML forms for sending user data. The instructor, M faculty, sets the stage for a session on form handling, recalling previous topics such as classes, objects, and inheritance in PHP. The paragraph also touches on the practical example of a result search form, illustrating how user input is submitted to the server for processing.

05:02

🔒 Form Validation, Sanitization, and Storage in PHP

This paragraph delves into the specifics of form processing in PHP, including validation, sanitization, and data storage. It explains form validation as the process of verifying user input against certain rules, using the example of a Google login form that requires a mix of uppercase, lowercase, digits, and special characters. The paragraph also highlights PHP's capabilities in creating dynamic and interactive web pages and the critical role forms play in applications like contact and registration forms, emphasizing the need for secure handling of sensitive information.

10:04

🌐 Understanding Form Elements and HTTP Methods

The third paragraph provides an in-depth look at the various form elements such as text boxes, text areas, dropdowns, radio buttons, checkboxes, and submit buttons, explaining their functions in a form. It also discusses the two primary HTTP methods used in forms: GET and POST. The GET method appends data to the URL, making it visible to the user, while the POST method sends data separately, keeping it hidden from the user. The paragraph further explains the importance of form attributes like 'action', 'method', and 'name' in defining how and where the form data is processed.

15:06

📝 Creating a Simple HTML Form with PHP

This paragraph outlines the process of creating a simple HTML form and embedding PHP within it. It describes the structure of an HTML form, including the opening and closing tags, and the use of attributes like 'action', 'method', and 'name'. The paragraph provides a step-by-step guide on adding form controls such as text boxes, text areas, email fields, password fields, and a submit button. It also explains the significance of the 'required' attribute in making certain fields mandatory for user input.

20:09

🔄 Exploring HTTP GET and POST Methods in Form Submission

The fifth paragraph focuses on the use of HTTP GET and POST methods in form submission. It explains how HTTP facilitates communication between the client and server as a request-response protocol. The paragraph provides examples of how to implement the GET method in an HTML form, detailing the process of requesting data from a specific source. It also contrasts the GET method with the POST method, which is used for submitting data to a specified source, with the key difference being the visibility of data in the URL.

25:11

📚 Conclusion and Preview of Upcoming PHP Sessions

The final paragraph concludes the session on form handling in PHP and provides a preview of the next topic: database handling using PHP with MySQL. It summarizes the key points discussed in the session, including the creation and processing of forms, the use of GET and POST methods, and the importance of form validation and security. The instructor thanks the students for their attention and expresses anticipation for the next session, which will cover database management in PHP.

Mindmap

Keywords

💡Form

A 'Form' in the context of this video is a graphical user interface used to collect user input in web development. It's a fundamental component that allows users to interact with a website by entering data, which is then submitted to a server for processing. In the script, forms are essential for tasks like searching for results, entering USN and date of birth, and are a key focus of the session on form handling.

💡HTTP

HTTP, or Hypertext Transfer Protocol, is the foundation of data communication on the web. It is a request-response protocol that enables interaction between clients (typically web browsers) and servers. In the video, HTTP is mentioned as the protocol used to send form data from the client to the server, with methods like GET and POST being discussed.

💡HTML Forms

HTML Forms are a set of elements used in web pages to collect user information. They are crucial for creating interactive webpages where users can input data. The script discusses HTML forms in the context of embedding PHP to create dynamic web applications that can handle user inputs like text boxes, submit buttons, and other form controls.

💡Form Handling

Form handling refers to the process of managing form data on the server side, which includes validating, sanitizing, and storing the data. The video's theme revolves around form handling in PHP, explaining how to create forms in HTML and process them with PHP to create interactive web applications.

💡PHP

PHP, or Hypertext Preprocessor, is a server-side scripting language used to create dynamic web pages. In the script, PHP is highlighted as the tool for processing form data, demonstrating how it can be embedded within HTML forms to collect and handle user inputs.

💡GET Method

The GET method is one of the two primary ways data is sent from a client to a server in an HTTP request. It appends data to the URL, making it visible and used for requesting data from a specific source. In the video, the GET method is contrasted with the POST method, showing how it can be used in forms to send data.

💡POST Method

The POST method is another way of sending data in an HTTP request, but unlike GET, it sends data in the body of the request, making it invisible to the user. It's used for submitting data to a server for processing, as discussed in the script when explaining form data submission.

💡Form Validation

Form validation is the process of verifying that the data entered into a form meets certain criteria before it is submitted. It's a critical part of form handling to ensure data integrity and security. The script mentions form validation as a PHP feature for processing form data.

💡Form Sanitization

Form sanitization involves cleaning the data entered into a form to prevent security vulnerabilities such as SQL injection. It's a part of the form handling process in PHP, as mentioned in the script, to ensure that the data is safe to use.

💡Inheritance

Inheritance is a concept from object-oriented programming that allows a new class to be created from an existing class, inheriting its properties and methods. In the script, inheritance is briefly mentioned as a concept discussed in a previous session, highlighting the relationship between classes in PHP.

💡Web Development

Web development is the process of creating and maintaining websites. It involves a range of skills, including HTML, CSS, and scripting languages like PHP. The script discusses web development in the context of form handling, emphasizing the importance of forms in creating interactive and dynamic web pages.

Highlights

Form is responsible for collecting user input in web development.

HTTP stands for Hypertext Transfer Protocol, which enables communication between client and server.

HTML forms are used to send user information using text boxes for single line input.

Forms play a fundamental role in server-side scripting with PHP.

PHP supports only single inheritance in object-oriented programming.

Form handling involves creating forms in PHP to collect and submit user data to the server.

Form processing in PHP includes form validation, sanitization, and data storage.

Validation ensures the correctness of user input, like rules for a password.

PHP forms enable the creation of dynamic and interactive web pages.

Forms are critical in applications like contact forms, registration forms, and login forms.

HTML forms use the 'form' tag with attributes like action, method, and name.

The 'get' method in forms appends data to the URL, while 'post' keeps data invisible to the user.

Form controls include text boxes, text areas, dropdowns, radio buttons, checkboxes, and submit buttons.

Creating a simple HTML form involves specifying the form elements and their attributes.

HTTP's 'get' and 'post' methods are used in forms for data retrieval and submission.

A web browser acts as a client submitting HTTP requests, while the server provides responses.

The session concludes with an introduction to database handling in PHP with MySQL in the next chapter.

Transcripts

play00:00

what is form here form is responsible

play00:03

for collecting the user input what do

play00:06

HTTP stands for hypertext transfer

play00:09

protocol used to enable communication

play00:13

between client and server HTML forms are

play00:17

used to send the user information text

play00:21

box allows the user to provide the

play00:24

single line

play00:28

input

play00:32

hello to all a warm welcome to my news

play00:36

session on 4th unit that is nothing but

play00:39

the form handling I'm your reati M

play00:42

faculty from the Department of computer

play00:44

science vidyashram first grade College

play00:47

the Temple of excellence mauru in my

play00:51

today's session I'm going to deal with

play00:53

form handling before going to start my

play00:56

today's session let me to recall the

play00:59

topic what what I have discussed in my

play01:01

last session in my last session I

play01:04

started with class what is a class class

play01:07

is nothing but a blueprint or template

play01:11

along with that I have discussed how to

play01:14

create a object object is nothing but

play01:17

the instance of the Class by using

play01:20

object I can able to access the

play01:23

functionalities of the class so we can

play01:27

able to create object using new keyword

play01:31

or new operator along with that I have

play01:34

discussed the concept called inheritance

play01:37

so what is inheritance inheritance is

play01:40

nothing but the feature of

play01:42

objectoriented

play01:43

programming we can able to create a new

play01:47

class from the existing class that

play01:51

concept is known as inheritance and PHP

play01:55

supports only single inheritance these

play01:59

are the con concept I have discussed in

play02:01

my last session but in my today's

play02:04

session I'm going to deal with form

play02:07

handling in the sense how we can able to

play02:10

create a form in PHP so dear student we

play02:15

know that we are going to use PHP for

play02:18

server side scripting and I'm going to

play02:22

include or embed PHP with my

play02:27

HTML and in HTML form as very important

play02:33

concept why I use form in order to

play02:37

collect the input from the client or

play02:40

user now if I consider PHP okay

play02:45

form plays very important role or it is

play02:48

a fundamental component okay that allows

play02:53

the user to accept the input in the

play02:56

sense what it's mainly used to give the

play02:59

or collect the input from the user so

play03:03

PHP form is a fundamental component in

play03:07

web development so if I consider web

play03:11

development I have the concept called

play03:13

form and forms are the way used to

play03:17

collect the user input and it allows the

play03:21

user to submit the data to a server okay

play03:26

fine dear student you are familiar

play03:30

with your result okay fine you are going

play03:33

to get the information that okay result

play03:37

is out now what you're going to do

play03:40

you're going to search the result so

play03:43

you're going to search the result okay

play03:46

now you're going to get the form so here

play03:50

you have the

play03:52

usn okay fine at the same time you have

play03:55

to give the input so you want to feed

play03:58

the input so you want to enter the usn

play04:02

at the same time you have the option

play04:05

that is date of birth and you have to

play04:07

fill the date of birth and you have the

play04:12

button called submit you have the button

play04:15

called

play04:16

submit okay fine now where I'm going to

play04:20

get this user interface in my client

play04:24

system think that I'm the client okay in

play04:26

my client system I'm going to get this

play04:29

interface okay this is nothing but the

play04:31

graphical user interface okay I'm going

play04:34

to get this interface now what I will do

play04:37

I'm going to enter the usn for example

play04:39

say U1 2 3 4 and date of birth some date

play04:44

of birth I'm going to enter okay when I

play04:47

press submit what's going to happen this

play04:50

data is submitted to the server okay

play04:54

this data is submitted to the server the

play04:58

job of the server is to process the data

play05:02

okay what's my requirement here my usn

play05:05

name and date of birth if my usn number

play05:09

and date of birth informations are

play05:12

present at the server okay now what the

play05:16

server is going to do server is going to

play05:18

process the data and it's going to send

play05:21

the response back so what is form here

play05:26

form is responsible for collecting the

play05:29

US user input so it allows to enter the

play05:33

data and it is responsible for

play05:36

submission of the data to the server so

play05:40

it provides an interface so it's a

play05:43

interface for the user so that user can

play05:47

able to enter the input in the sense

play05:50

what user can able to interact with the

play05:55

website PHP offers various functions and

play05:59

features to handle the form processing

play06:03

so the form processing may be form

play06:07

validation so verify the form is known

play06:10

as form validation data sanitization and

play06:15

data storage okay so PHP form offers

play06:20

what are the facility form validation

play06:23

form sanitization and data storage so

play06:27

what is validation validation is nothing

play06:30

but the verification okay fine dear

play06:33

student we are familiar with the Okay

play06:37

Google login

play06:39

right Google login so we have the US

play06:43

usern

play06:45

name okay and we have the

play06:49

password so while entering password okay

play06:54

I want to write the rule okay that's

play06:56

nothing but the validation so what is is

play06:59

the rule I want to

play07:01

follow so see here I can have the

play07:04

uppercase I can have the lower case

play07:07

letters along with the digit and my

play07:10

password must have any special symbols

play07:15

okay I can have the uppercase lowercase

play07:18

digit and special symbols that is

play07:20

nothing but the validation okay now with

play07:25

PHP form developers can able to create

play07:30

Dynamic and interactive web page so that

play07:34

user can able to enter their input and

play07:39

they can able to perform the action okay

play07:42

and they're going to get the output

play07:44

based on the input so users are

play07:48

responsible for entering the input okay

play07:50

and servers are responsible for

play07:53

processing the result and the processed

play07:57

result is sent back to the client now if

play08:01

I consider PHP form form plays very

play08:05

critical role in

play08:08

applications such as contact form in the

play08:11

sense what when I want to collect

play08:14

contact information okay registration

play08:18

form we have online registration right

play08:21

okay for that we can have the online

play08:23

registration form we have the login

play08:26

forms okay so when I collect the

play08:30

sensitive information okay I want to

play08:33

take care of the application okay

play08:36

application is nothing but the forms so

play08:40

HTML forms are used to send the user

play08:44

information now in PHP okay to collect

play08:48

the user information what I will do I'll

play08:51

go with the HTML form now how I'm going

play08:55

to create a form for that I'm going to

play08:59

have have the tag called form in HTML I

play09:03

have the tag called form okay and I can

play09:06

have the form element and this form must

play09:11

have the closing form tag now in PHP to

play09:17

collect the user information I'm going

play09:19

to use the forms okay so in PHP I can

play09:24

able to embed PHP with the htmls for

play09:28

that reason I'm going to use the HTML

play09:31

forms now if I consider form I have the

play09:36

attribute so how I'll write okay I have

play09:39

the form tag okay and I can have the

play09:43

attribute and if I consider the

play09:45

attribute I have the action called URL

play09:51

my action always

play09:53

URL so I'm going to specify okay to

play09:57

which web page I want to link l so I'll

play10:00

write the complete URL so I'm going to

play10:03

write the complete navigation to where

play10:06

okay and how I'm going to collect all

play10:09

the web page information I'm going to

play10:12

write in my action so this attribute

play10:15

usually has a link to web page that

play10:19

contains code which process the form

play10:23

okay so your action is nothing but the

play10:26

URL next method if I consider form I I

play10:31

can have two methods get method and post

play10:34

method get in the sense what get the

play10:37

data from the resource and post in the

play10:39

sense what where I want to post the data

play10:43

so here I can able to use two methods

play10:46

one is get and another one is post so

play10:50

this attribute specifies how the

play10:52

information is sent get okay with a get

play10:57

method so how I'm going to send the the

play10:59

data for that I'm going to have the get

play11:02

method all the information is sent in

play11:07

your url string so what is URL Universal

play11:11

resource locator and if I go with post

play11:15

method all the information is sent but

play11:19

invisible to the user so if I go with

play11:23

the get method okay I can able to view

play11:26

the information in my URL but if I go

play11:29

with the post method I cannot able to

play11:32

find any information in my URL so it is

play11:36

invisible to the user and I have the

play11:40

name okay suppose if I want to specify

play11:43

the name of the name of the form then I

play11:46

can able to specify when creating

play11:49

complex form and using scripting you may

play11:53

need to specify the name so specify the

play11:57

name of the form form the name should be

play12:01

unique so while specifying the name of

play12:04

the form and if I have two two three

play12:07

forms then I want to specify the unique

play12:11

name for each form so that I can able to

play12:15

identify the form

play12:18

uniquely now okay what are the controls

play12:22

I can have in my forms so think that

play12:26

okay this is your

play12:29

Google form so this is your Google form

play12:33

okay fine now what I want to do I want

play12:37

to get student information for that I'm

play12:40

creating the Google form so what I will

play12:43

do I'll write okay name so I'm going to

play12:48

provide the box so that user can able to

play12:52

input their name okay fine then I must

play12:56

have the

play12:57

gender okay then okay I'll provide okay

play13:02

they have

play13:03

to they have to select their combination

play13:07

for example

play13:10

BCA

play13:12

BBA and

play13:15

bcom okay at the same time they have to

play13:18

submit the form so I'll give the button

play13:22

called

play13:23

submit so here text box labels okay okay

play13:29

checkbox button these are the controls

play13:33

okay these controls are used to design

play13:36

the form now see here okay form

play13:39

processing contains a set of controls

play13:43

through that client can able to provide

play13:46

the input now the most common form

play13:50

control is text box text box in the

play13:53

sense what user want to provide the

play13:56

input so text box allows the user to

play13:59

provide the single line input okay so by

play14:03

using single line I can by using text

play14:07

box I can able to access only single

play14:10

line input then what about text area

play14:13

when user want to provide multiple line

play14:18

input then we will go with the text area

play14:21

multiple line in the sense what more

play14:23

than two lines then drop down drop down

play14:27

or combo box allows the user to provide

play14:31

select a value from a list of value so

play14:36

see

play14:37

here this is your drop down when I

play14:40

select this one I want to get a long

play14:43

list of information so that user can

play14:46

able to select one information so that's

play14:50

nothing but your drop down now if I

play14:53

consider another okay control that is

play14:56

nothing but the radio buttons so what is

play14:59

radio buttons radio button allows the

play15:02

user to select only one option so when I

play15:06

can have the radio button for example if

play15:08

I consider gender either I can have the

play15:11

male or I can have the female so I want

play15:14

to select one option at a time so I'll

play15:17

go with the radio button there are

play15:20

certain time I want to select multiple

play15:22

option then I'll go with the checkbox so

play15:26

checkbox allows the user to select

play15:29

multiple option okay suppose if I want

play15:33

to select

play15:34

BCA Okay then if I want to select

play15:38

BBA okay then what I will do I'll go

play15:41

with the checkbox then what about submit

play15:44

that is nothing but the button so

play15:46

buttons are the clickable component so

play15:51

when I press the button okay what's

play15:53

going to happen the event is going to

play15:55

trigger okay this button is going to

play15:57

trigger

play15:59

and okay this button is responsible for

play16:02

okay submitting the form to the server

play16:05

okay fine these are the some of the

play16:07

controls okay fine now let's create a

play16:11

simple HTML form we know that okay we

play16:16

are going to embed

play16:19

PHP in my HTML so I'll start with the

play16:23

HTML and if I want to give the name to

play16:27

the form okay so I'm going to give the

play16:30

title that is simple form

play16:34

processing and see here I'm creating the

play16:38

form so I'll start with the form and I

play16:42

want to specify the ID because in one

play16:46

single HTML I can able to include

play16:49

multiple forms okay for example I have

play16:52

form one I have form two and I have form

play16:56

three three forms so I want to to

play16:58

identify these forms uniquely for that

play17:01

I'm going to have the ID okay then I

play17:04

want to write the method as it get or as

play17:08

it post okay fine now see here first

play17:12

okay I want to get the first

play17:17

name first name okay in front of that

play17:21

okay I want to read single line input

play17:25

for that I'm going to have the okay I'm

play17:28

going to have the text box so dear

play17:31

student here input is nothing but the

play17:34

tag where type is nothing but the

play17:38

attribute used to specify the type okay

play17:41

so here I'm using text box so it is

play17:45

text in the sense okay what kind of

play17:48

input I'm using for example if I'm using

play17:51

text text box or text Area radio button

play17:55

checkbox I want to specify that one what

play17:58

kind kind of control I'm using then name

play18:02

okay I want to give the name so I'll

play18:04

write first name okay it is compulsory I

play18:07

want to provide the input compulsory so

play18:10

I'll write required then in the next

play18:12

field okay next line what I want to get

play18:15

I want to get the last name okay to

play18:18

enter the last name once again I'm

play18:21

considering the text box okay so what is

play18:24

the name of the text box that nothing

play18:27

but the last name

play18:29

then okay I want to get the address

play18:32

address so it is multi-line right so

play18:35

input type text

play18:39

area name what I'm going to give the

play18:42

address okay fine then email

play18:46

address so what kind of control I can

play18:49

have the control is email see

play18:53

here in my HTML 5 I can have the email

play18:58

even I can have the controls like

play19:01

password so what's my input type here

play19:04

email okay so what is the name of the

play19:07

control mail

play19:09

address next what is my input type

play19:12

password okay so what is the type of

play19:15

input it is password what is the name of

play19:18

the input it is password okay then I

play19:23

want to have the button so it is nothing

play19:27

but the type so what kind of input type

play19:30

okay what kind of input here submit so

play19:33

it is a button okay and what is the

play19:36

value I must have on my button that's

play19:40

nothing but the submit now what I'm

play19:42

going to do here I'm going to close the

play19:44

form now I'm going to close the body and

play19:48

I'm going to close the HTML and if I see

play19:51

the output how it's it's going to look

play19:55

first name I'll write F

play19:57

name colon okay you're going to get the

play20:00

text box then L

play20:03

Name colon text box after that

play20:09

address okay once again text

play20:12

box next

play20:14

email uh address once again text box

play20:19

then your

play20:21

password once again text box and the

play20:26

button it is submit okay this is the

play20:30

expected output now see here I'm going

play20:33

to use HTTP get and post method in my

play20:38

form so what are the two methods I can

play20:41

have in my form either get or post now

play20:45

the hypertext transfer protocol what do

play20:49

HTTP stands for hypertext transfer

play20:52

protocol used to enable communication

play20:56

between client and server

play20:58

when I want to enable the connection

play21:01

between client and server what I will do

play21:04

I'll go with the

play21:07

HTTP so that is nothing but the

play21:09

hypertext transfer protocol now HTTP

play21:13

works as a request response

play21:18

protocol between client and server when

play21:21

I use

play21:25

HTTP okay it act as a

play21:29

request and response so request in the

play21:32

sense what client is going to do the

play21:35

request okay who is going to provide the

play21:38

response that is none other than server

play21:41

for that reason HTTP work as a request

play21:46

response protocol between client and

play21:50

server so a web page that is a web

play21:54

browser what is web browser it's a

play21:57

application s software where we get our

play22:00

output on the browser and example for

play22:04

browser Mozilla Opera Chrome okay these

play22:09

are the example for the browser okay a

play22:12

web browser may be the

play22:15

client and an application on a computer

play22:19

that host a website maybe a server my

play22:24

browser is nothing but the client okay

play22:27

application is nothing but the server so

play22:30

a client that is none other than browser

play22:34

okay submits and

play22:37

HTTP request who is going to submit

play22:40

client is going to submit the request

play22:43

and who is going to provide the response

play22:46

that none other than the server okay

play22:49

fine the response contain status

play22:53

information about the request okay and

play22:56

may also contain in the requested

play22:59

content in the sense what client is

play23:02

responsible for requesting the resource

play23:06

and who is going to responsible for

play23:08

providing the response that is none

play23:10

other than server so client sends the

play23:14

request now the server is responsible

play23:17

for accepting the request process the

play23:20

request and send the response back to

play23:23

the client okay and if I consider HTT p

play23:28

p what are the two commonly used methods

play23:32

that is get method and post method if I

play23:36

use get method okay what is the job of

play23:39

the get method request data from a

play23:42

specific source so I'm going to request

play23:45

the data from this specific Source in

play23:47

the sense what from where I want to get

play23:49

the data okay I'm going to request by

play23:52

using get and what about

play23:55

post I'm going to submit the data data

play23:58

okay submit the data to the processed to

play24:03

a specified Source in the sense what to

play24:06

whom I want to submit okay that is done

play24:09

by using post okay fine let me to

play24:13

consider the simple example here okay

play24:15

how we can able to use the get method so

play24:19

it is my HTML code what is the title of

play24:22

the form get form okay now I have the

play24:25

body so I'm getting the mage say get

play24:28

form and I have the form in my form I'm

play24:32

using the method called get and I'm

play24:35

going to specify the action from where I

play24:38

want to get the data or form so that's

play24:41

nothing but the process

play24:44

form.php

play24:45

now okay I'm going to have the label

play24:49

okay what I'm going to give name I want

play24:52

to have the name in my label okay fine

play24:56

then in front of of label what I must

play24:59

have I must have the text box for that

play25:02

I'm going to have the input type called

play25:05

text okay and I I'm going to specify the

play25:08

name of the text box at the same time

play25:11

okay I'm going to provide the ID of the

play25:13

text box okay now see here I I must have

play25:18

the email so for that what I will do I'm

play25:21

going to use the input type called email

play25:25

if I want to have the message okay then

play25:29

what I will do I'll take the text area

play25:32

when I take text area when I want to

play25:35

read multiple line input when I want to

play25:39

have multiple line input then I'll go

play25:42

with the text area okay fine then at the

play25:46

end I must have the button okay for that

play25:49

I'm going to consider the type button

play25:52

button is nothing but the submit and

play25:54

what is on my button I must have the

play25:57

value or text on the button that is

play26:00

nothing but the submit and I'm going to

play26:03

close the form I'm going to close the

play26:05

body I'm going to close the HTML this is

play26:08

the way I can able to use get method in

play26:11

my HTML okay in my PHP as well as in my

play26:17

HTML anyway dear student in my today's

play26:20

session I started with what is form

play26:23

forms are nothing but the way used to

play26:25

collect the input from the user okay so

play26:28

how we are going to collect the input

play26:30

from the user is nothing but the form

play26:33

now okay along with that I have

play26:36

discussed what is get method what is

play26:38

post method how to use get method and

play26:41

how to use post method anyway this is

play26:44

all about how we can able to handle

play26:47

forms in HTML anyway dear student let's

play26:52

meet in the next chapter that is nothing

play26:56

but the database handling using PHP with

play27:00

my SQL anyway dear student let's meet in

play27:04

the next session with the new chapter

play27:07

that is nothing but how we can able to

play27:10

handle database in PHP anyway dear

play27:14

student thank you for watching my

play27:16

session and let's meet in the next

play27:18

session with more information about PHP

play27:22

thank you

Rate This

5.0 / 5 (0 votes)

Связанные теги
PHP FormsWeb DevelopmentForm HandlingHTML FormsGET MethodPOST MethodForm ValidationData SanitizationUser InputServer ScriptingEducational Session
Вам нужно краткое изложение на английском?