Hudzilla.org - the homepage of Paul Hudson
Contents > Wish List | Report Bug | About Me ]

7     HTML Forms

This is NOT the latest copy of this book; click here for the latest version.

PHP was originally designed for use on the Internet, and although you can now use it for command-line apps and GUIs, its main purpose remains working on the web. When it comes to the web, HTML has ruled unchallenged for some years now as the de facto standard for displaying information, even more so now that WAP usage has evaporated. This means that if you want to write a front-end for your PHP web applications, you need to understand HTML.

Topics covered in this chapter are:

  • Form design using HTML

  • Sending and receiving form data with PHP

  • Splitting forms across pages

  • Validating input


Chapter contents

7.1. The state of play
7.2. What does it mean to be dynamic?
7.3. Designing a form
7.3.1. GET and POST
7.3.2. Available elements
7.3.3. A working form
7.4. Handling data
7.4.1. register_globals
7.4.2. Working around register_globals: import_request_variables()
7.4.3. Magic quotes
7.4.4. Data handling summary
7.4.5. Handling our form
7.5. Splitting forms across pages
7.6. Files sent through forms
7.7. Validating input
7.7.1. Client-side validation
7.7.2. Server-side validation
7.7.3. Validation in practice: is_string(), is_numeric(), is_float(), is_array(),is_object(), and is_resource()
7.7.4. Advanced variable validation using CTYPE
7.7.5. Key validation points
7.8. Form design
7.9. Summary
7.10. Exercises
7.11. Further reading
7.12. Next chapter



<< 6.23 Next chapter   7.1 The state of play >>
Table of Contents
Want to see this stuff in print? PHP in a Nutshell takes the core topics covered here, adds in thousands of edits from the editorial team and myself, and combines them to make an unbeatable reference for PHP programmers at all levels.



My latest book has hundreds more tips on how to use PHP, Apache, and MySQL, plus Perl, Python, shell scripts, performance tuning, and more!



Top-right shadow
 
Bottom-left shadow Bottom shadow

Comments from other readers
A PHP/HTML User - 04 Jul 2008

I am impressed, this a real good Job

sssabat@yahoo.co.in - 04 Jul 2008

i want this book. If you give this i will highly oblige to you

Another PHP User - 04 Jul 2008

So am I

A PHP User - 04 Jul 2008

I am impressed



Add comment
Please note that by posting a comment here you are committing it to the public domain. This is important so that others can make use of your code themselves, and also so that I can incorporate helpful notes directly into the main text. Comments are limited to 2000 characters in length.

If you are reporting an error in the content, please tell me directly.

Your name/email address:
Your comment:
 
Now, in order to verify that you're a real person, please answer this simple question: what is six plus nine?
The answer is:
(please write in
numbers, eg 19)


Top-right shadow
 
Bottom-left shadow Bottom shadow