Skip to main content
Inspiring
August 17, 2007
Question

Login/password protection

  • August 17, 2007
  • 2 replies
  • 261 views
Hi,

Can anyone point me to a tutorial on how to create database that users
would have to log into using unique usernames and passwords and then
have the ability to add, delete, or append records associated with their
user ID?

Thanks for your help!

David
This topic has been closed for replies.

2 replies

Inspiring
August 17, 2007
Okay, thanks. I think I've got it.

David


[CJ] wrote:
> well, i'd think you'd have a USER table and let's call it a USERRECORDS table.
>
> USER
> ---------
> userID (pk)
> userName
> password
>
> USERRECORDS
> -----------------------
> userrecordID (pk)
> userID (fk)
> (any other columns here)
>
> userID in the USER table would be the foreign key in the USERRECORDS table and
> relate a userrecord to a particular user.
>
> prior to inserting a new record into the USER table, run a SELECT query to see
> if the chosen user name exists or not. if it does, alert the user and prompt
> for a new username.
>
August 17, 2007
well, i'd think you'd have a USER table and let's call it a USERRECORDS table.

USER
---------
userID (pk)
userName
password

USERRECORDS
-----------------------
userrecordID (pk)
userID (fk)
(any other columns here)

userID in the USER table would be the foreign key in the USERRECORDS table and relate a userrecord to a particular user.

prior to inserting a new record into the USER table, run a SELECT query to see if the chosen user name exists or not. if it does, alert the user and prompt for a new username.