hi
i'm using cookies but one thing is not working
i want to store serialized arrays in a array
and set that array in a cookie
this is how i do it:
<?php
include("posts/" . $forum_id . "" . $topic_id . "post.php3");
$leeftijd = time() + 86400 * 40;
$bijelkaar = count($reply) + 1;
if($posts_cookie[$forum_id]) {
$posts_cookie_rij = unserialize($posts_cookie[$forum_id]);
}
$posts_cookie_rij[$topic_id] = $bijelkaar;
$posts_cookie_rij = serialize($posts_cookie_rij);
setcookie("posts_cookie[$forum_id]", $posts_cookie_rij, $leeftijd);
?>
yes it is a forum used with files
and this is how i read it out..:
<?php
include("posts/" . $forum_id . "_posts.php3");
$j = count($posts) - 1;
if(!$posts_cookie[$forum_id]) {
$image = "niet_bekeken.gif";
} else {
$posts_cookie_rij = unserialize($posts_cookie[$forum_id]);
}
while(0 <= $j) {
include($posts[$j]);
$bijelkaar = count($reply) + 1;
if($posts_cookie_rij[$j] >= $bijelkaar) {
$image = "al_bekeken.gif";
}
?>
but it isn't working it always shows
as image "al_bekeken.gif"...
can somebody help me?
thank you
Derk
sorry for my bad english