How do you flag a registration error?

G

Guest

I have set up a site with a members only area. I have the logon and logon
validation set up and working fine. If the user is in the Access database
and the password matches they are let in to the members area, if not they are
redirected to the logon page to try again or Register as a member/user. I
set up a registration form that submits to the database and proceeds to a
confirmation page where the user can see the user name and password they
entered. The user can then go to the members area and log in. Here is where
the problem comes in:

In the database I have username set as the primary key so that everyone must
have a unique user name. When a new person tries to register using a user
name that already exists - no error message is generated. It goes to the
confirmation page and looks like the registration posted correctly but when
they try to log in they can not because the password they selected is not
correct for the already existing user name. How do I get the form to
validate the user name and produce an error message if the user name already
exists? Then the new user can come up with a different user name.

Sorry for the long description but I wanted to make sure I gave as much info
as possible.
 
S

Stefan B Rusynko

In your server side coding you would take their new desired username and try to open the DB for a record using that username (same
code as when a user tries to log in)
- if you get a no record found it is not a dupe
(you can then proceed to write the new credentials to the DB and send them to the confirmation page)
- if you get a record found it is a dupe
(you redirect back to the registration page w/ an error message telling them and do not attempt to create the new credentials)

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I have set up a site with a members only area. I have the logon and logon
| validation set up and working fine. If the user is in the Access database
| and the password matches they are let in to the members area, if not they are
| redirected to the logon page to try again or Register as a member/user. I
| set up a registration form that submits to the database and proceeds to a
| confirmation page where the user can see the user name and password they
| entered. The user can then go to the members area and log in. Here is where
| the problem comes in:
|
| In the database I have username set as the primary key so that everyone must
| have a unique user name. When a new person tries to register using a user
| name that already exists - no error message is generated. It goes to the
| confirmation page and looks like the registration posted correctly but when
| they try to log in they can not because the password they selected is not
| correct for the already existing user name. How do I get the form to
| validate the user name and produce an error message if the user name already
| exists? Then the new user can come up with a different user name.
|
| Sorry for the long description but I wanted to make sure I gave as much info
| as possible.
 
G

Guest

Thank you, Stefan. I was trying to make it much harder than it needs to be.
I'll go back to my corner and color now. Thanks again.

J
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top