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

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
admin12
Posts: 412
Joined: Wed May 11, 2011 9:47 am

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

Post by admin12 » Fri Jul 01, 2011 6:46 pm

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
Last edited by admin12 on Mon Aug 01, 2011 6:51 am, edited 2 times in total.

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

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

Post by townsend » Fri Jul 01, 2011 6:56 pm

As for the password, search for, "How to ask for a password" on this page: soSmartSoftware.com

admin12
Posts: 412
Joined: Wed May 11, 2011 9:47 am

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

Post by admin12 » Fri Jul 01, 2011 9:00 pm

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

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

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

Post by townsend » Mon Jul 04, 2011 6:35 pm

(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.

Post Reply