This topic is locked

Username, Passwords

12/10/2003 2:40:52 AM
ASPRunnerPro General questions
author

When Admin adds a new user to the database I want username to always be [Fname]&[Zipcode] and I want to set the passord as [Lname]&[EmpID]. The user would be able to change the password later on but I also want that to be > 4 characters in length. Anyone know how I do this and where I but the code in my pages?
Thanks <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=259&image=1&table=forumtopics' class='bbc_emoticon' alt=':rolleyes:' />

Sergey Kornilov admin 12/10/2003

Hi,
I guess that will be something like this:

strSQL = " insert into users (name, password) values ('" & _

Replace(Request.Form("Fname"),"'","''")  & Replace(Request.Form("Zipcode"), "'","''") _

& "','" & Replace(Request.Form("Lname"),"'","''")  & _

Replace(Request.Form("Empid"), "'","''") & "')"
dbConnection.Execute strSQL


After that you can allow users to change password manually. You can use built-in ASPRunner edit form validation (set Edit as property for this field to Password).
Best regards,

Sergey Kornilov