|
Galleriescript with cookies is not working yet, you can finish it?
Hi,
I already have this code
.............?php
// Get and Set Cookie Data
$cokcount++;
setcookie("count", $cokcount);
// Get the file
$fp = fopen("testing.txt", "r");
$contents = 1; // Start up the loop
$id = 0;
$varname = 'quote';
while ($contents)
{
$contents = fread($fp, 1);
if ($contents == "\n")
{
$id++;
$newvar = $varname.$id.'='.$output; // Creates variable/key to parse
parse_str($newvar); // Parses our string into a variable
$output = ''; // Clear the 'buffer' so there's not repetition
}
$output = $output.$contents;
}
fclose($fp);
// Create Header URL
$makeurl = "quote" . $cokcount;
$gotourl = $$makeurl;
header ("Location: " . $gotourl);
// print $quote1;
?............
(..... is < or > but the code fuction doesn't work for me )
WHat I want that it does is, picks the nr1 gallerie and stores a cookie at the HD then when the phpfile is clicked again it takes gallerie 2 then 3 and so one..
Any idea how to fix it, because now it keeps getting the nr1 gallerie at the txt file
Andre
__________________
Questions?
ICQ: 125184542
|