forms
Magic quotes and strings
In this lesson, you learn:
- That PHP’s magic quotes feature adds extra backslashes to text.
- How to use the
stripslashes()function to fix the problem.
Improving validation
Learn how to do a sequence of checks on a value passed to a PHP page.
Basic server-side validation
Topics covered:
- Understand why you need server-side and client-side validation.
- Know how to check whether a value sent to the server is a valid number.
Client-side validation
Learn:
- How to get form data into JavaScript variables.
- How to check that data for errors.
- How to report errors to the user.
Saving form data to a file
Learn:
- How to append form data to a file.
- How to read back data from the file.
- Know how to do some basic security stuff.
Send form data by email
Learn:
- How to use the
<textarea>tag.
- How to use PHP’s
mailfunction to send an email message.
Form data in PHP
Learn:
- How PHP fetches form data.
- How to fetch data from
postandgetforms.
Forms in HTML
In this lesson, you learn that:
- Browsers send form data to Web servers along with URLs.
getattaches form data to a URL.postputs it in a separate HTTP header.
- URL encoding handles special characters in URLs.
- The basic attributes of
<form>areactionandmethod.
- The basic attributes of
<input>aretype,name, andsize.
- The basic attribute of
<button>istype.