I have a contact form which initially "onsubmit"
calls a javascript function to validate the content. If this function returns true it then posts the data to a php file.
At the end of this file I would like to return to the contact page, currently I am using this:
header('Location: ' . $_SERVER['HTTP_REFERER']);
is there a better way?
I would also like to change the css on an element on the contact page to display when I return (a thank you message), is this possible? I can set it to display using jQuery in the initial javascript function but that gets wiped out when it goes to the php file.
Thanks