I have user registration form that calls another file which calls an object that performs validation.
I would like to create this form to be sticky and display info about validation errors next to respective fields.
How can I resend data to the page with the form?
You could use client-side JavaScript validation (and back that up with server-side PHP validation too) but if you set the forms' POST target to be the same page that generates the form (so $_SERVER['REQUEST_URI']) you could call the validation object/class in a statement like:
if (isset($_POST['submit'])) {
// Validation code
}
// Generate form along with any output from validation script