Page 1 of 1

SOLVED - How do you make a login box in Live Code?

Posted: Fri Jul 01, 2011 6:46 pm
by admin12
I created the graphics for a login box, with username and password fields, submit button, etc. However, I have the following questions:

(1) How do I make the password non-readable (like a normal login box - password has circles instead of text) ----- SOLVED

(2) How do I make it a form, check the username/password from the database (stored in a table called user validation), and error check it so that it sends you to a new registar if you are not in the system. If you get it right, it sends you on your way. I know how to do some of this, but any help would be great.

Mike

Re: How do you make a login box in Live Code?

Posted: Fri Jul 01, 2011 6:56 pm
by townsend
As for the password, search for, "How to ask for a password" on this page: soSmartSoftware.com

Re: How do you make a login box in Live Code?

Posted: Fri Jul 01, 2011 9:00 pm
by admin12
Thank you. That definitely works. Now I just have to write the routine to connect to the database, gather the name and password, see if they are valid and point them in the right direction. How do you pass the tpassword variable to other cards?

Mike

Re: How do you make a login box in Live Code?

Posted: Mon Jul 04, 2011 6:35 pm
by townsend
(2) How do I make it a form, check the username/password from the database (stored in a table called user validation), and error check it so that it sends you to a new registar if you are not in the system. If you get it right, it sends you on your way. I know how to do some of this, but any help would be great.
1- Well- creating the form fields is easy enough.

2- Check the DB to make sure the email address has not already been registered.

3- If you're allowing the user to select their own userName, check that too. Make sure to check case as well. You don't want two identical names with different case spellings. PostgreSQL allows you to create a lower case key. I don't think MySQL does, so there, you'd need to have two userName fields. One for display, the other in all lower or upper case.

4- Then I would generate a random number, and tell the user they need to enter that number into the app to verify their email address. On your DB, I'd make that a text field. If it was greater than zero, then their not verified. If equal to zero or "yes" then they're okay.

5- Of course you have to email that random number to them, so grab some SMTP sample code from RevOnline. You could do some kind of search on their existing email client to find their current SMTP address, or a simpler and more secure method would be to run a password protected SMTP server off you domain, specifically for this purpose. If neither of these is practical right now, there are other slower options.