|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
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 |
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: Feb 2002
Location: Florida
Posts: 672
|
You need to use the same variable name as the cookie value name.
<code> // Get and Set Cookie Data $cokcount++; setcookie("cokcount", $cokcount); </code> I am assuming you have "register_globals" on.
__________________
- this space intentionally left blank - |
|
|
|
|
|
#3 |
|
Confirmed User
Industry Role:
Join Date: May 2002
Location: oregon.
Posts: 2,243
|
sick. turn register_globals off and use the $_COOKIE array. code securely and more proper!
__________________
php/mysql guru. hosting, coding, all that jazz. |
|
|
|
|
|
#4 | |
|
Too lazy to set a custom title
Join Date: Aug 2001
Location: The Netherlands
Posts: 13,723
|
Quote:
I'm a real newbie programmer I tried it with <code> $cokcount++; setcookie("cokcount", $cokcount); </code> But it still won't work...DOes that mean register globalls if off? Th eother suggestion was Turn globalls off and use the cookie array, but I have no idea how to do that A lot to learn here for me Andre
__________________
Questions? ICQ: 125184542 |
|
|
|
|