Link to home
Start Free TrialLog in
Avatar of cat4larry
cat4larry

asked on

LOGIN HELP!!

Does anyone have a good Login and registration.  I need to be able to have a person login but first they need to register. Have the the users information stored in a database
Avatar of brougham
brougham

How far are you currently?  You are going to need a form first of all - depending on what information you want from them - you may need a few dynamically populated <select> inputs or radio buttons.  Possibly a picture?  Are you familiar with building a simple form?

<form action="act_page.cfm" method="post">
    <input type="text" name="frm_firstname"><br>
    <input type="submit" value="submit">
</form>

And then you will need to put your code on act_page.cfm - like the database insert:

<cfquery ...>
    INSERT INTO app_users (txt_firstname) VALUES ('form.frm_firstname')
</cfquery>

It's going to be a bit more complex than that - but you get the idea.  Would you like me to email you a basic registration page and it's corresponding act page?  If you are planning on doing this again - you may consifer picking up a book on the subject and practicing a bit.

Adam.
Avatar of cat4larry

ASKER

I have started something I just want to see another way of doing it. If you can send me your pages that would be great
larryt@fusiongrafix.com
ASKER CERTIFIED SOLUTION
Avatar of Dain_Anderson
Dain_Anderson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dain - great article!
Its is a great article but Im haveing problems because after the person is to register I want them to go to a another page besides the login page. The application.cfm brings the user back to the login after they register.
I think everything you need is there, you just need to modify it slightly.

It might work if you just kill the javascript where it sets the current page to the hardcoded default -- If you remove that you may trickle through to your code.

Otherwise, you can pull the login logic out and place it in a seperate template that you CFINCLUDE at the beginning of your secure documents.  Right before you CFINCLUDE it, you could set a parameter of your desired destination page (the parm would be different for every page...)  Then you just open up that puppy instead of the default.

Hope this helps !





After the user registers, create a session as you would in the login page, with the new user ID, and something perhaps like Session.Started = True. That way, the user is taken to the index page, not the login page.

Dain
what if I want him to end up on a diffrent page other than the index page.  my problem is once they register they can't login for 24hrs.  I have to verify the information agaist another database to make sure it is correct. Once the user is able to login he is going to see his data. Its for a timeshare company owners of timeshare need to view and update there information, instead of calling in.
For this I would create a boolean (bit) field in the table you're using for logins, perhaps something like "IsConfirmed", where the user obviously has an account, but hasn't been verified. From this, you can create a page that tells the user that their account was created, but will require 24 hours to become active.

In my opinion (and I realize you may have little control over this) this is an easy way to lose users -- who wants to wait 24 hours to login?

Let me know if I'm completely off-base, as I don't fully understand what you're trying to accomplish.

Dain
Your not off base, this site is for owners of timeshare. After an Owner registers, the company has to verify the persons iformation against the company's operations system that sits on a AS400.  So that could take up to 24 hrs to get done.
Thanks for your help