I am still new for php. Lets say i am registering user for a web page. If the user id is not unique , how can i display the error message? Coz if I just use echo its giving me problem when i use header() function. Coz if user are registered they will be rediect to different page and if the registeration is fail they will be redirect to previous page. so any idea ? how i can display the error message to the user? can i use error handling? any suggestion ? thank you