There are a number of possibilities, including saving it in a database or emailing the data to yourself.Whichever you choose, you need to be sure: Validation is essential, particularly if you are going to save the data in a database – remember the old saying, GIGO (Garbage In, Garbage Out), and you won’t go far wrong.When form input is important, it should always be verified using a secure server-side script.
Any errors or omissions will be highlighted with a message alongside the relevant field. The purpose of the form is to capture user details (name, address, and email) to obtain feedback (on fruit consumption and favorite fruit) and request a brochure. There are two specific attributes that need to be set in the form tag, .The purpose of a form validation script is to return a boolean value ('s to reference form fields, but that can lead to namespace conflicts and why make things more complicated than necessary.When the form is submitted - either by hitting Enter or clicking on the Submit button - the (the 'value' of the field called 'input' belonging to the form). In a real-life situation you will most likely have more fields to check, and more complicated conditions, but the principle remains the same.For further information on And if you enjoyed reading this post, you’ll love Learnable; the place to learn fresh skills and techniques from the masters.Members get instant access to all of Site Point’s ebooks and interactive online courses, like Jump Start PHP.