Schlo_50 Posted September 30, 2006 Share Posted September 30, 2006 What code snippet can i use to make sure that my registration form doesn't submit, but instead displays an error message when a user tries to register but the username they have chose is already in taken?Thanks guys!-Schlo Quote Link to comment https://forums.phpfreaks.com/topic/22579-usernames/ Share on other sites More sharing options...
Schlo_50 Posted September 30, 2006 Author Share Posted September 30, 2006 8) Quote Link to comment https://forums.phpfreaks.com/topic/22579-usernames/#findComment-101328 Share on other sites More sharing options...
HuggieBear Posted October 1, 2006 Share Posted October 1, 2006 You're going to need to allow the form to submit anyway. Once it checks the database to see if the user exists, it either registers them or it spits out an error, returning them to the page, the fields can be pre-filled with the values they already entered.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/22579-usernames/#findComment-101771 Share on other sites More sharing options...
Orio Posted October 1, 2006 Share Posted October 1, 2006 Unless you use something like ajax to check.Orio. Quote Link to comment https://forums.phpfreaks.com/topic/22579-usernames/#findComment-101773 Share on other sites More sharing options...
HuggieBear Posted October 1, 2006 Share Posted October 1, 2006 [quote]Unless you use something like ajax to check.[/quote]I didn't want to explain that route, am a little too hungover for that one :DRegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/22579-usernames/#findComment-101778 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.