Jump to content


Photo

PHP and cookies


  • Please log in to reply
3 replies to this topic

#1 majocmatt

majocmatt
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts

Posted 08 October 2006 - 12:42 AM

Users are able to vote via text input on my site, but they only are allowed to vote for a certain string once per day, but as many different strings per day as they like.

I want to force this by setting cookies, what though, is the best way to do this since there will be multiple strings? One string per cookie or can you set an array of strings in a single cookie?

Thanks.

#2 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 08 October 2006 - 12:21 PM

I'd say each string to have it's cookie, it'll be easier for you.

Orio.
Think you're smarty?

(Gone until 20 to November)

#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 08 October 2006 - 01:54 PM

You could also acheve this with useing sessions.

a thort good luck.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#4 majocmatt

majocmatt
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts

Posted 09 October 2006 - 11:46 PM

Ok, i will do seperate cookies for each string, however, i dont think sessions alone will work since i want them to be persistent even if they leave and come back later. i realize this wont work if they use a diff computer but im simply trying to minimize the problems




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users