If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Advanced Poll Cookie Troubles  XML
Forum Index » Support Forum
Author Message
Anonymous



Hey everybody. I finally got my poll working (with the great help from this forum) but now I'm having trouble with the cookies. For some reason, the voters can vore as many times as they want. I'm not sure what to do from here.

I've got the php include right above the <html> tag in my poll.php file. The path is correct to poll_cookie.php but it's still not doing anything.

Could someone drop a suggestion or two? Thanks alot. Also, what is the permission for poll_cookie.php?

Thanks for taking the time to read my post.

Check me out if that will help - http://www.smellkid.com
Anonymous



I am having the same problem! It give the following error when some one votes.

Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site109/fst/home/counter-center/public_html/index.php:2) in /home/virtual/site109/fst/home/counter-center/public_html/poll/poll_cookie.php on line 14

then they can vote again.
Is there a premisson problem?
e-mail me please:
skater_kid87@hotmail.com
Helge Forstner
Beginner

Joined: 04/05/2002 21:50:12
Messages: 12
Location: Celle, Germany
Offline

Smellkid wrote:
Hey everybody. I finally got my poll working (with the great help from this forum) but now I'm having trouble with the cookies. For some reason, the voters can vore as many times as they want. I'm not sure what to do from here.


Have you checked \db\poll_cookie.php?

Mine works. But how do I install the correct duration?

global $HTTP_GET_VARS, $HTTP_POST_VARS;
$cookie_expire = 168; // hours

This seems to be clear. I have set it to 1 Week = 168 hours.

At the end of the file is this:
$cookie_name = "AdvancedPoll".$poll_ident;
if (!isset($HTTP_COOKIE_VARS[$cookie_name])) {
$endtime = time()+3600*$cookie_expire;

What is the above line for? What does the 3600 mean? hours? minutes?
Do I have to change it if I want a duration of 1 week?

setcookie($cookie_name, "1", $endtime);
}

Harry H. Forstner
Celle, Germany
[Email] [WWW]
Anonymous



3600 seconds = one hour
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum