I’m trying to write my first PHP script (hopefully). I want to send user input from a form inside an HTML page to a PHP script and validate them inside script. then, if there is any problem with input data, return to first page and highlight wrong fields. else go to another page (something like successful).
How do i send feedback from second script to first page without using forms?
Just make your Form POST to itself, then in your PHP check the values and if they are valid, don’t display your form and do your submit code. If they are invalid, display the form with the values and errors displaying.