Wiederum vielen Dank für die Hilfen. Ich denke, dass mit diesem Posting auch noch "spätere Genereationen" etwas anfangen können, weil es so gute Erklärungen gibt.
Schön ist, dass ich keine Fehlermeldungen mehr bekomme. Blöderweise hat die Abstimmungnoch immer den Haken, dass man beliebig oft abstimmen kann.
Das hier ist der "Cookie-Setzer". Ist das Ding korrekt so?
<?php
/**
* ----------------------------------------------
* this code is optional
* Important! You have to include it
* before your html code
* ----------------------------------------------
*/
if (!headers_sent()) {
$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);
}
}
}
?>
Vielen Dank, Gruß