Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Because the script you used to validate are invisible to the user, server side validation is more secure. Once a user fills out a form, the action parameter tells the form to send the information to a script written in a language like PHP. The method parameter sends the data to the form processing script, in one of two ways. If you use the get method, the data is sent to the script as part of a URL. If you use the post method, the data gets sent in the background. Each method has different advantages and disadvantages.
With the get method, requests can be cached by the browser. The requests can also remain in the browser history, and they can be bookmarked. But since there's a limit to how much data can be sent via a URL, you can't send forms that have too much information. On the other hand, with the post method, requests are not cashed and don't remain in browser history. So, the requests cannot be bookmarked, but there's no limit to the size of a post request. So, you can send longer forms with this method. Once the form is sent to the server side script, the information can be accessed through something called a superglobal. You'll find out more about superglobals on this page in the PHP manual. Superglobals are associative arrays that are always available through every part or scope of your server side script.
The ones that are relevant to forms are the get, post, and request superglobals. The get and post superglobals are designed to receive information from the form, as specified in the method parameter of the form. The request superglobal is a generic variable designed to receive data from get, post, or even cookie requests. The process for sending and receiving data is crucial to learning how to process and validate form fields. In the next movie, we'll experiment with how the superglobals receive data from forms.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 98235 Viewers
61 Video lessons · 85544 Viewers
71 Video lessons · 69495 Viewers
56 Video lessons · 101838 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.