Use server-side validation JavaScript and PHP Forms


show more Using server-side validation provides you with in-depth training on Developer. Taught by Ray Villalobos as part of the Validating and Processing Forms with JavaScript and PHP show less
please wait ...

Using server-side validation

Now that we know how to access variables, let's take a look at how we would validate data in different ways. I'm going to show you how to check for a required field, a minimum number of characters, make sure that our passwords match, and use regular expressions for validation. So, I'm going to set up some variables in my process.php file. I'm using the files from the previous movie, so I'm going to go ahead and delete everything right here. And start by creating some variables. The input fields that we're going to work with are: the name field, the password field, and the password confirmation field.

So I'll create variables for those. I'll check the request, that we got from the server, and look for the variable, my name, from the form. I can do the same thing for the password and the password confirmation. The easiest type of validation to do is check for required field. All you have to do is make sure that the string is not empty. So, let...

Using server-side validation
Video duration: 4m 59s 2h 51m Intermediate

Viewers:

Using server-side validation provides you with in-depth training on Developer. Taught by Ray Villalobos as part of the Validating and Processing Forms with JavaScript and PHP

Subjects:
Developer Web
Software:
JavaScript PHP
Author:
please wait ...