I am currently using this code to ensure my fields are completed for my registration form:
//This makes sure they did not leave any fields blank
if (!$POST['firstname'] |!$POST['surname'] |!$POST['email'] |!$POST['username'] | !$POST['pass'] | !$POST['pass2'] ) {
die('You did not complete all of the required fields');
}
If the users fails to complete a field then the form just disapears and the text 'You did not complete all of the required fields' is displayed on a blank background.
However what I would like is rather than the form dies - it stays on the page and the error message is displayed next to the appropriate field. How can I achieve this?
Many thanks as always.
Jon