View Single Post
Old 07-12-2002, 12:05 PM  
justsexxx
Too lazy to set a custom title
 
Join Date: Aug 2001
Location: The Netherlands
Posts: 13,723
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

Last edited by justsexxx; 07-12-2002 at 12:06 PM..
justsexxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote