Cookie Data

This is a discussion on "Cookie Data" within the Classic ASP section. This forum, and the thread "Cookie Data are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 19th, 2005, 17:31
New Member
Join Date: Jun 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Cookie Data

How do I pre-populate a form's text field with cookie data? I have a form that requests user input. For example, name and initials, among other things. The input is saved into a Cookie. I'd like to have the cookie data fill in the name and initials fields automatically from the cookie. Help!
Reply With Quote

  #2 (permalink)  
Old Aug 21st, 2005, 06:18
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Suggestion - take a step back and do NOT store personal data directly in cookies. As and when your site visitors look at their cookies, they're likely to freak out at finding their personal data revealed there - especially if they happen to be sharing a computer at an internet cafe or using an internet telephone at an airport or motorway service area! You're potentially making it easier for the identity thief :o .

Alternative - send out a single cookie that contains a unique key, and save the data for the user on your server - either in a database or a text file. To repopulate the form ... get the cookie ... read the appropriate file or row ... print the contents into the "value" as you display the fields next time.
Reply With Quote
  #3 (permalink)  
Old Aug 23rd, 2005, 12:02
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
the above answer is what should really be doing, but here ya go anywayz:

Code: Select all
<input type="text" name="name" value="<%=Request.Cookies("name")%>">
Reply With Quote
Reply

Tags
cookie, data

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] cookie does not get saved thosecars82 JavaScript Forum 2 May 23rd, 2008 12:13
Help with login script (session/cookie)... skuliaxe PHP Forum 3 Feb 16th, 2008 14:07
Fortune Cookie alexgeek Webforumz Cafe 7 Oct 11th, 2007 13:13
(localhost) cookie weirdness Donny Bahama PHP Forum 4 May 29th, 2007 14:44
Cookie Help! graeme JavaScript Forum 3 Jun 17th, 2006 14:22


All times are GMT. The time now is 20:58.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43