Add in-page validation JavaScript and PHP Forms


show more Adding in-page 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 ...

Adding in-page validation

So far, we've been processing the fields in a separate PHP document. Another option is to make the form and the processor be on the same page. That makes it easier to provide on-page feedback. So, in this video, I'll show you how to move the form from our external script to the current page. I'm going to make some changes to the form first. To be a little bit more secure, I'll change the method of this page to Post. I'll change the Action field so that the form submits to itself. We could just use the name of this page as the action, but I'll use another PHP superglobal called Server to make the form submit to itself. So, right here I'm going to create a short PHP script. It'll just echo the superglobal server and it'll pass along as the parameter php underscore self.

So, I'm going to save that and if I refresh my page. So, if you take a look at the source code for this page, you can see that the action is the same as the URL for thi...

Adding in-page validation
Video duration: 5m 22s 2h 51m Intermediate

Viewers:

Adding in-page 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 ...