Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 06-07-2011, 06:53 AM
Bansaw's Avatar
Bansaw Bansaw is offline
Contributing Member
 
Join Date: 09-04-06
Posts: 59
iTrader: 0 / 0%
Simple cookie javascript code ?

I just simply want to store a cookie on a users local machine as a flag.

Its like those sites that store a cookie when you've, for example, voted in a poll.
I guess they check for the existence of a cookie and say,"you have already voted".

All I want is a flag that indicates the user has been to my site before.
Not looking to store any info like username, passwords , etc. Just a simple flag.

Where would I find code for that?
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 06-07-2011, 07:11 AM
nemrod's Avatar
nemrod nemrod is offline
v7n Mentor
 
Join Date: 12-21-10
Location: Sweden
Posts: 463
iTrader: 0 / 0%
What language?

In PHP, for example, you can use the setcookie() function to save a cookie and $_COOKIE['name_of_cookie'] to retrieve it.
 
Reply With Quote
  #3  
Old 06-07-2011, 07:12 AM
Bansaw's Avatar
Bansaw Bansaw is offline
Contributing Member
 
Join Date: 09-04-06
Posts: 59
iTrader: 0 / 0%
Javascript. thanks.
 
Reply With Quote
  #4  
Old 06-07-2011, 07:19 AM
nemrod's Avatar
nemrod nemrod is offline
v7n Mentor
 
Join Date: 12-21-10
Location: Sweden
Posts: 463
iTrader: 0 / 0%
First result when googling "javascript cookies": http://www.quirksmode.org/js/cookies.html
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
simple javascript troubleshoot chuco61 Coding Forum 14 08-08-2008 11:25 AM
JS: Simple Javascript But please help Calisonder Coding Forum 1 04-17-2007 07:48 PM
Simple JavaScript question I, Brian Coding Forum 16 01-07-2005 11:27 AM
Javascript cookie to remember css choice? Shannon Coding Forum 2 07-07-2004 07:12 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 03:44 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC