Link to home
Start Free TrialLog in
Avatar of slegy
slegy

asked on

Request.Querystring with Cookie

I'm creating a membership renewal process whereby the users either enter their ID or do a lookup on their ID. Once verified, the client wants further verification through the entry of their email address and the use of social provider passwords. By adding that piece in between entry/lookup and retrieval/display of their member information, I can't figure out how to pass the key through. I've looked in to using a cookie, but don't know if/how to assign it to the recordset querystring. Is this the way to go or is there a better way of doing it - or is it even possible?
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Cookies are separate from the URL and querystring.  There is a short section here http://www.w3schools.com/asp/asp_quickref.asp on setting and getting cookiees.

You need to "Request Attention" and get the Classic ASP or the ASP.NET zones added to your question.  It's not really a Dreamweaver question.
Avatar of slegy
slegy

ASKER

Sorry, I find your categorization subjects very difficult to use.

The reason I made it a Dreamweaver question is because specifying the key for record retrieval when creating a recordset is where I am running into problems. Here's what I've done so far (that isn't working):
- I believe I've created the cookie containing the Member ID when it has been identified:
 sql = "SELECT * FROM Members WHERE memberID = '" & Trim(Request.Form("memberID")) & "'"
 Set rs=conn.Execute(sql)
memberID=rs("memberID")
Response.Cookies("memberID")=rs("memberID")
- in the detail display page, I've requested the cookie: Cookies.memberID
- this is the value that needs to be specified when creating the redordset:
   MMColParam - text - Request.Querystring("Cookies.memberID") - Default=AAAAA000

It doesn't work. Would a session variable be a better idea?
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

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
Avatar of slegy

ASKER

Thank you for your help. It seems to be working. Although, as an aside, the "onload" funtions are not being executed. They worked fine before I added the "request cookie." I will submit this issue separately.
Request.Cookies() is executed on the server and "onload" is executed in the client's browser.  They normally have nothing to do with each other.  The only connection between the two would be if the Request.Cookies() code causes some variable that is passed to your javascript to change.