Forums

This topic is locked

Complete registration

Posted 04 Mar 2003 10:20:49
1
has voted
04 Mar 2003 10:20:49 Jelle-Jacob de Vries posted:
Can somebody tell me how to create application where a user has to complete there registration by clicking a link that comes with an email?

Do I need a cookie that hold the values of the form before inserting into the database?

Replies

Replied 04 Mar 2003 15:53:03
04 Mar 2003 15:53:03 Dave Clarke replied:
No you don't need cookies.
You need a field in your registration database, called say 'confirmed', set this to "No" by default.

Then in your email send a link to your registration page with the users datails in the link, something like this

"Click this link to confirm your membership" & tab2 & "www.yourdomain.com/confirm.asp?" & "usname="&username & "&email="&emailadd & "&usrid="&usrid

On your confirmation page, you need a recorset filtered by the details in the link(username, email address and user ID), and a form with a field that updates the recordset field 'confirmed' to "Yes", have this form submit automatically onload and re-direct to your thanks for confirming page.

That's how I do it anyway.
Just a quick run through, to point you in the right direction, ask for more detail.

Dave

ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome
Replied 04 Mar 2003 17:06:20
04 Mar 2003 17:06:20 Jelle-Jacob de Vries replied:
Thanks Davecl,

You really have a piont here, but what if the users with a confirm status of "no" try to login?
How can I restrict acces to page based on a level and confirm status.

thanks in advance
Replied 04 Mar 2003 17:41:35
04 Mar 2003 17:41:35 Dave Clarke replied:
mmmm

On my site they can still log - in without being confirmed but it's easy enough to apply a 'restrict access to page' behaviour (standard in DW) which would redirect them to another page if they weren't confirmed.

Dave

ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome
Replied 04 Mar 2003 19:40:39
04 Mar 2003 19:40:39 Jelle-Jacob de Vries replied:
Oke your right, but do you know how modify the restrict access to page behaviour, so I can restrict access based on two values instead of the standard one?
Replied 05 Mar 2003 08:04:25
05 Mar 2003 08:04:25 Dave Clarke replied:
One value?
the restrict access to page behaviour works with either 2 or 3 values depending on what you want.

1 username and password (anybody registered can access page)

2 username, password and access level

When you apply the behaviour if you want to use the 2nd option (which you do) you can define the access level by telling it to look in the 'confirmed' field of the recordset for "Yes".
Once the behaviour is on the page it will then only allow access to someone who is logged in and who has an access level of "Yes"
You can define as many access levels as you want.
e.g on my site is have 3 levels - Guest, Member and Admin
So I can restrict pages to anybody (no behaviour), registered (behaviour set to Guest), registered and confirmed (behaviour set to Member) or Adminisrtators (behaviour set to Admin)


That's it.

ooops almost forgot, you would probably want your administrators to be able to access all pages, so you would have to include that access level on all the pages with the behaviour on, for example if you set it to 'Guest' then anybody registered but not confirmed could access it but your admin wouldn't be able to so you have to include that level, same thing applies to members, if a guest can access the page then a member should be able to too so you would have to include them.

Dave

ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome

Edited by - Davecl on 05 Mar 2003 08:19:58

Reply to this topic