Navigate
Home
ArticleWiki
Forum
Journal
Search
Newsletter
Links
Tech News
expertsrt.com
Welcome Guest.
Username:

Password:

Remember me

Cookies via fastrobbie
Welcome, Guest. Please login or register.
November 23, 2008, 07:53:38 AM
11307 Posts in 1250 Topics by 501 Members
Latest Member: rosaline
Experts Round Table Network  |  Serverside Technology  |  ASP  |  Cookies via fastrobbie « previous next »
Pages: [1]
Author Topic: Cookies via fastrobbie  (Read 494 times)
rdivilbiss
Moderator
*
Offline Offline

Posts: 414



WWW
« on: December 04, 2007, 06:22:21 PM »

As you can guess I'm a little bit stuck. More like wrapped  in confusion. Website has progressed but I cant seem to pull off one of the last steps. Cookie control. I have cookies reading in and out of a database i.e. www.kohchangbookingandinformation.com/BillingSignIn.asp without a password because it's going to Paypal and Paypal handles all that and I'm trying to make it simple. Then Customer detail in http://www.kohchangbookingandinformation.com/BillingandShipping_D.asp. Next I have a Edit routine for purchases in  www.kohchangbookingandinformation.com/Robby_Hard.asp before it goes to Paypal so you can see what I'm up to. My question :
How do I setup a cookie system that recognizes an old  customer throughout the site that has previously setup a dbf record  via member BillingSignIn/BillingandShipping_D.asp. I Hope this is not too much of an imposition and hope to hear from you soon. Sincerely Robby
Logged

Rod
rdivilbiss
Moderator
*
Offline Offline

Posts: 414



WWW
« Reply #1 on: December 04, 2007, 06:27:05 PM »

With ASP you can use the response.Cookies to write a cookie.

Response.Cookies("Customer") = Session.SessionID
Response.Cookies("Type").Expires = "July 31, 2037"

Assuming session id was sufficiently random, that should work.

Upon returning to a a page, Request.Cookies("Customer") should return the past SessionID which of course should have been stored in your databasse and used as the key to look up the customer data.

If there is no cookie, you'll need the customer to provide their user id and password to retrieve their profile.

If the is a cookie, don't perform any sensitive action without first asking for their password.
Logged

Rod
Pages: [1]
« previous next »
    Jump to: