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 
Messages posted by: goodwin24
Forum Index » Profile for goodwin24 » Messages posted by goodwin24
Author Message
Okay... I have installed advance poll on my website... But now whenever I vote I get...
Warning: Cannot modify header information - headers already sent by (output started at /home/goodwin2/public_html/index.php:6) in /home/goodwin2/public_html/poll/poll_cookie.php on line 21
So... I went into my poll_cookie.php and it says...
<?php
/**
* ----------------------------------------------
* this code is optional
* Important! You have to include it
* before your html code
* ----------------------------------------------
*/

$cookie_expire = 96; // hours

$action = (isset($HTTP_GET_VARS['action'])) ? $HTTP_GET_VARS['action'] : '';
$action = (isset($HTTP_POST_VARS['action'])) ? $HTTP_POST_VARS['action'] : $action;
$poll_ident = (isset($HTTP_GET_VARS['poll_ident'])) ? $HTTP_GET_VARS['poll_ident'] : '';
$poll_ident = (isset($HTTP_POST_VARS['poll_ident'])) ? $HTTP_POST_VARS['poll_ident'] : $poll_ident;

if ($action=="vote" && (isset($HTTP_POST_VARS['option_id']) || isset($HTTP_GET_VARS['option_id']))) {
$cookie_name = "AdvancedPoll".$poll_ident;
if (!isset($HTTP_COOKIE_VARS[$cookie_name])) {
$endtime = time()+3600*$cookie_expire;
setcookie($cookie_name, "1", $endtime);
}
}

?>

I was wondering if anything was wrong with this php code... If someone has the answer... I would love to know!
 
Forum Index » Profile for goodwin24 » Messages posted by goodwin24
Go to:   
Based on the open source JForum