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.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 07-12-2002, 12:05 PM   #1
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
Old 07-12-2002, 03:14 PM   #2
Cogitator
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 -
Cogitator is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-12-2002, 03:42 PM   #3
mike503
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.
mike503 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-12-2002, 04:15 PM   #4
justsexxx
Too lazy to set a custom title
 
Join Date: Aug 2001
Location: The Netherlands
Posts: 13,723
Quote:
Originally posted by Cogitator
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.
Hi,

I'm a real newbie programmer So I have NO idea if I have register_globals on.

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
justsexxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.