SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Presented By: Lakshita Chawla
Enrollment Number: 03320602023
HTML forms are an essential component of web
development, enabling interaction between users
and websites. A form consists of various input
fields, such as text fields, checkboxes, radio
buttons, dropdown menus, and buttons, which
allow users to input data and submit it to a server
for processing.
Form handling in PHP involves capturing user
input from HTML forms and processing it on the
server side. Form handling typically involves
retrieving the submitted data, performing any
necessary validation or sanitization, and then
processing it further (e.g., saving to a database,
sending emails, etc.).
FEATURE GET POST
Data Transmission Data is sent via URL parameters
Data is sent in the body of the
request
Visibility Data is visible in the URL Data is not visible in the URL
Data Length Limit
Limited by URL length (typically
2048 characters)
Limited by server configuration or
PHP settings (typically larger than
GET)
Security
Less secure for sensitive
information, as data is visible in
URL and can be bookmarked or
cached
More secure for sensitive
information, as data is not visible
in URL and is not cached or
bookmarked
Idempotent
Should be idempotent (i.e.,
multiple identical requests should
have the same effect as a single
request)
May or may not be idempotent,
typically used for operations that
change state (e.g., submitting a
form)
Form processing refers to the actions taken with the
data submitted through a form. This includes tasks
such as validating the input, storing it in a database,
sending it via email, or performing any other
necessary operations based on the form's purpose.
In PHP, form processing is typically done in the same
PHP script that handles form submission.
Form validation is the process of ensuring that
the data submitted through a form meets certain
requirements or constraints. This can include
checking for required fields, validating email
addresses, verifying the format of dates etc.
TEXT
This creates a single-line text
input field where users can
type alphanumeric
characters.
SYNTAX:- <input type =
“text” name=“Name”>
This creates a password input
field where the entered
characters are masked (usually
as asterisks or dots).
SYNTAX:- <input type
=“password” name=“password”>
This creates a set of radio buttons where
users can select one option from multiple
choices.
SYNTAX:- <input type="radio"
name="gender" value="male"> Male
<input type="radio" name="gender"
value="female"> Female
This creates checkboxes where
users can select multiple options.
SYNTAX:- <input
type="checkbox"
name="hobbies[]"
value="reading"> Reading
<input type="checkbox"
name="hobbies[]"
value="cooking"> Cooking
PASSWORD RADIO CHECKBOX
TEXTAREA
This creates a multi-line text input
field where users can enter longer
text entries, such as comments or
messages.
SYNTAX:- <input type = “TextArea”
name=“Message”>
DROPDOWN
This creates a dropdown menu where users can
select one option from a list.
SYNTAX:- <select name="country">
<option value="usa">United States</option>
<option value="uk">United Kingdom</option>
<option value="canada">Canada</option>
</select>
HIDDEN
This creates an invisible input field
that's not displayed to the user but
can be submitted with the form data.
SYNTAX:- <input type="hidden"
name="user_id" value="123">
Thank you!

Weitere ähnliche Inhalte

Ähnlich wie FORMS IN PHP contains various tags and code (20)

Html Form Controls
Html Form ControlsHtml Form Controls
Html Form Controls
 
Forms with html5 (1)
Forms with html5 (1)Forms with html5 (1)
Forms with html5 (1)
 
Forms with html5
Forms with html5Forms with html5
Forms with html5
 
Web Development
Web DevelopmentWeb Development
Web Development
 
Html forms
Html formsHtml forms
Html forms
 
Html forms
Html formsHtml forms
Html forms
 
html 5 new form attribute
html 5 new form attributehtml 5 new form attribute
html 5 new form attribute
 
JavaScript - Chapter 14 - Form Handling
 JavaScript - Chapter 14 - Form Handling   JavaScript - Chapter 14 - Form Handling
JavaScript - Chapter 14 - Form Handling
 
ASSIGNMENT3 ew.docx
ASSIGNMENT3 ew.docxASSIGNMENT3 ew.docx
ASSIGNMENT3 ew.docx
 
Php forms and validations by naveen kumar veligeti
Php forms and validations by naveen kumar veligetiPhp forms and validations by naveen kumar veligeti
Php forms and validations by naveen kumar veligeti
 
Spsl v unit - final
Spsl v unit - finalSpsl v unit - final
Spsl v unit - final
 
Web topic 20 2 html forms
Web topic 20 2  html formsWeb topic 20 2  html forms
Web topic 20 2 html forms
 
Web topic 20 1 html forms
Web topic 20 1  html formsWeb topic 20 1  html forms
Web topic 20 1 html forms
 
WIT UNIT-4.pdf
WIT UNIT-4.pdfWIT UNIT-4.pdf
WIT UNIT-4.pdf
 
Html forms
Html formsHtml forms
Html forms
 
forms.pptx
forms.pptxforms.pptx
forms.pptx
 
Internet Environment
Internet  EnvironmentInternet  Environment
Internet Environment
 
Session and cookies ,get and post methods
Session and cookies ,get and post methodsSession and cookies ,get and post methods
Session and cookies ,get and post methods
 
Fm 2
Fm 2Fm 2
Fm 2
 
Designing web pages html forms and input
Designing web pages html  forms and inputDesigning web pages html  forms and input
Designing web pages html forms and input
 

Kürzlich hochgeladen

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 

Kürzlich hochgeladen (20)

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 

FORMS IN PHP contains various tags and code

  • 1. Presented By: Lakshita Chawla Enrollment Number: 03320602023
  • 2. HTML forms are an essential component of web development, enabling interaction between users and websites. A form consists of various input fields, such as text fields, checkboxes, radio buttons, dropdown menus, and buttons, which allow users to input data and submit it to a server for processing.
  • 3. Form handling in PHP involves capturing user input from HTML forms and processing it on the server side. Form handling typically involves retrieving the submitted data, performing any necessary validation or sanitization, and then processing it further (e.g., saving to a database, sending emails, etc.).
  • 4. FEATURE GET POST Data Transmission Data is sent via URL parameters Data is sent in the body of the request Visibility Data is visible in the URL Data is not visible in the URL Data Length Limit Limited by URL length (typically 2048 characters) Limited by server configuration or PHP settings (typically larger than GET) Security Less secure for sensitive information, as data is visible in URL and can be bookmarked or cached More secure for sensitive information, as data is not visible in URL and is not cached or bookmarked Idempotent Should be idempotent (i.e., multiple identical requests should have the same effect as a single request) May or may not be idempotent, typically used for operations that change state (e.g., submitting a form)
  • 5. Form processing refers to the actions taken with the data submitted through a form. This includes tasks such as validating the input, storing it in a database, sending it via email, or performing any other necessary operations based on the form's purpose. In PHP, form processing is typically done in the same PHP script that handles form submission.
  • 6. Form validation is the process of ensuring that the data submitted through a form meets certain requirements or constraints. This can include checking for required fields, validating email addresses, verifying the format of dates etc.
  • 7. TEXT This creates a single-line text input field where users can type alphanumeric characters. SYNTAX:- <input type = “text” name=“Name”> This creates a password input field where the entered characters are masked (usually as asterisks or dots). SYNTAX:- <input type =“password” name=“password”> This creates a set of radio buttons where users can select one option from multiple choices. SYNTAX:- <input type="radio" name="gender" value="male"> Male <input type="radio" name="gender" value="female"> Female This creates checkboxes where users can select multiple options. SYNTAX:- <input type="checkbox" name="hobbies[]" value="reading"> Reading <input type="checkbox" name="hobbies[]" value="cooking"> Cooking PASSWORD RADIO CHECKBOX TEXTAREA This creates a multi-line text input field where users can enter longer text entries, such as comments or messages. SYNTAX:- <input type = “TextArea” name=“Message”> DROPDOWN This creates a dropdown menu where users can select one option from a list. SYNTAX:- <select name="country"> <option value="usa">United States</option> <option value="uk">United Kingdom</option> <option value="canada">Canada</option> </select> HIDDEN This creates an invisible input field that's not displayed to the user but can be submitted with the form data. SYNTAX:- <input type="hidden" name="user_id" value="123">
  • 8.