Chapter 5. Advanced Form Techniques
IN THIS CHAPTER
In Chapter 4, "Working with Forms in PHP," I introduced the HTML form and showed how it can be used to input data into a PHP script. In this chapter, I will take a step back from the standard HTML form/PHP relationship and introduce an assortment of methods and concepts that you can directly apply to your PHP scripts. In this chapter you will find ways to accomplish tasks such as protecting values passed to HTML forms (hidden fields), data encoding and transformation, as well as some eloquent methods of validating data submitted from forms.
Note that this chapter isn't designed to be an end-all, as there are often many methods to accomplish tasks discussed here. This chapter attempts to cover only some of the more useful methods and functions using PHP and should serve as a basis for your own scripting methods.