Showing errors at registration
Posted: Sun Dec 19, 2010 9:08 am
Hi.
I've created the html form and a way to process data to mysql database, but what I want to do is handle errors. For example if user tried to register with invalid email format and username containing invalid characters, I want both to be shown once he tries to register. All I managed to do now is one error at a time (by doing if statements, starting from username via password to email. First it checks for valid username, then it checks for valid password, then it checks for valid email and returns one error at a time, depending of which error statement returned false so the script stops there)
I hope you can help me.
I've created the html form and a way to process data to mysql database, but what I want to do is handle errors. For example if user tried to register with invalid email format and username containing invalid characters, I want both to be shown once he tries to register. All I managed to do now is one error at a time (by doing if statements, starting from username via password to email. First it checks for valid username, then it checks for valid password, then it checks for valid email and returns one error at a time, depending of which error statement returned false so the script stops there)
I hope you can help me.