October 19, 2012 at 9:49 am
Hey guys ,
I'm new here and I really need your help.
I need to write a script that creates registration (for first visit to the website) and then login (if they already registered), But there are 2 restrictions:
First the username must be unique and if a user chooses a name that already exists I need to suggest alternative username that doesn't exist.
Second I need a strong password that is at least 5 characters long and combines capital letters, small letters, digits and symbols.
Thanks a lot
October 19, 2012 at 10:28 am
What have you already tried?
How do you plan on tracking passwords & logins?
This is really more of a programming question that a SQL Server question. Could you explain how you plan on having SQL 2008 involved?
October 19, 2012 at 10:33 am
valentina1983 (10/19/2012)
Hey guys ,I'm new here and I really need your help.
I need to write a script that creates registration (for first visit to the website) and then login (if they already registered), But there are 2 restrictions:
First the username must be unique and if a user chooses a name that already exists I need to suggest alternative username that doesn't exist.
Second I need a strong password that is at least 5 characters long and combines capital letters, small letters, digits and symbols.
Thanks a lot
Hi and welcome to SSC. Unfortunately you did not provide very much information for anybody to work with here. Most of the stuff you are asking about is not sql related.
Let's break this down in pieces.
I need to write a script that creates registration (for first visit to the website)
There is no chance we can help here because we don't know what a registration is. Is this a single table or a number of tables?
and then login (if they already registered)
This is on your site entirely and has nothing to do with sql.
First the username must be unique
Add a unique constraint to the column in the table. or maybe this is the primary key which also ensures uniqueness.
and if a user chooses a name that already exists I need to suggest alternative username that doesn't exist.
I assume you want to generate a list of possible usernames that don't already exist? You need to provide some business rules about what to suggest.
Second I need a strong password that is at least 5 characters long and combines capital letters, small letters, digits and symbols.
This should be done in the front end and not in sql. SQL should store the hash value instead of the clear text password.
Do you see now why I say that most of this is not sql related?
If you need help with the sql portions we can help but you need to provide enough details so we can help. That is typically in the form of ddl and sample data. Take a look at the first link in my signature for best practices when posting questions.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
October 19, 2012 at 12:27 pm
we don't know what your preferred programming language is;
here's a link to an article on how to make a registration form in asp.net;
if you prefer php or something else, just search for "sample php registration form" or something similar.
Lowell
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply