Registering users with a database

Results 1 to 2 of 2

Thread: Registering users with a database

  1. #1
    Jason Barnham Guest

    Default Registering users with a database

    Hi<BR><BR>I need to set a login system where users choose a login name. <BR><BR>Because the user name will then form part of a html page that will be created for them, I need to make sure they only use certain characters i.e.<BR>&#039a-z&#039, 0-9&#039, &#039-&#039, and &#039_&#039 <BR><BR>Has anyone any idea how I acheive this?<BR><BR>My other option is to create a USER field in the database and have it autonumber. The problem with this is I am not sure how to check which number the database has selected when I pass them to the confirmation page. If I use the number method then I will not have any unique fields to check against.<BR><BR>I feel I would prefer to use the second option because if you give a user the option to choose his/her name and it is not availbale it may be off-putting.<BR><BR>Help appreciated.<BR>Jason Barnham

  2. #2
    Join Date
    Dec 1969

    Default RE: Registering users with a database

    Hey Jason.<BR><BR>To answer your first question I sat down and wrote up an article! :)<BR><BR>Checking a String for Certain Characters <BR><BR><BR>I think you&#039ll find it answers your questions. It shows two methods to validate strings: using client-side JavaScript and using server-side ASP code.<BR><BR>I&#039d also highly recommend you check out the following article:<BR><BR>Simple Authentication<BR><BR><BR>It discusses how to maintain a database of users, and how to restrict unauthenticated users. Sounds like it might be useful for what you&#039re doing...<BR><BR>Happy Programming!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts