username and password
-
hi i have created a main page with username and password (not a web page), i want to know how am i suppose to save this password and username in the database. so everytime i login, i need to type my password and username to enter the next page.. 1. on the first time i login i dont need a password and username but once i'm login i need to set a password and username so i can use them the next time. is that possible? 2. can i know the coding to validate this pass and username.. pls help!!!
-
hi i have created a main page with username and password (not a web page), i want to know how am i suppose to save this password and username in the database. so everytime i login, i need to type my password and username to enter the next page.. 1. on the first time i login i dont need a password and username but once i'm login i need to set a password and username so i can use them the next time. is that possible? 2. can i know the coding to validate this pass and username.. pls help!!!
1. first check if the username is present in the database if so go to 2.;P if not insert a new record in db with username and password (make username unique value in db otherwise you might have problems) 2. this is depending on wether or not you want to encrypt the password if not you just compare 2 strings (password is saved as a readable string in db) if txtusername.text.tolower.equals(db.username.tolower) then if txtpassword.text.tolower.equals(db.password.tolower) then end if end if if you do want to use encrypted password its a bit more difficult but I have the code somewhere if you need it I'll look for it just let me know hope this helps -- modified at 9:44 Monday 23rd July, 2007
-
1. first check if the username is present in the database if so go to 2.;P if not insert a new record in db with username and password (make username unique value in db otherwise you might have problems) 2. this is depending on wether or not you want to encrypt the password if not you just compare 2 strings (password is saved as a readable string in db) if txtusername.text.tolower.equals(db.username.tolower) then if txtpassword.text.tolower.equals(db.password.tolower) then end if end if if you do want to use encrypted password its a bit more difficult but I have the code somewhere if you need it I'll look for it just let me know hope this helps -- modified at 9:44 Monday 23rd July, 2007
thank you so much that helped a lot