I have a form which once the Submit button is pressed, it goes to a blank page and returns any error messages on that blank page. However I have a website template and I wish that my script is run, and returns the the page which did the action POST and puts any error messages on that page.
Example of what is happening:
PAGE REQUESTS POST —-> SCRIPT RUNS —> RETURNS ERROR MESSAGE
What I want it to do is:
PAGE REQUESTS POST —> SCRIPT RUNS —-> GOES TO THE PAGE WHICH REQUESTED POST —-> SHOWS ANY ERROR MESSAGES WHICH THE SCRIPT PICKED OUT.
Sure you can, just set the Action of your form to the current page. Then the
$_POSTwill contain all the values the user filled in the form.