Jump to content

Form Validation Error


BLinCT

Recommended Posts

on this test pag: http://www.webauthorsgroup.com/index2.html, I created an "include" file (for the php form script), but if you just click on (or forgot a field) the submit button, it doesn't produce the error above the form, but rather it produces a seperate page with the form and error(s).

 

How can I correct this so that the error messages are echoed on the same page?

Link to comment
https://forums.phpfreaks.com/topic/271160-form-validation-error/
Share on other sites

Is there any chance to see any PHP code?

 

Set your form action to index2.php. At the top of that page(above the doctype declaration, you can process the code there).

 

if(isset($_POST['name'])){
include("process_form.php");
}

 

Regards,

 

AoTB.

  On 11/25/2012 at 10:45 PM, AoTBuNgLe said:

Is there any chance to see any PHP code?

 

Set your form action to index2.php. At the top of that page(above the doctype declaration, you can process the code there).

 

if(isset($_POST['name'])){
include("process_form.php");
}

 

Regards,

 

AoTB.

 

The URL is of an html file so unless they have it configured to parse php, they would need an ajax call. And then all the errors would be displayed at the top of the page instead of where they want

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.