PHP Classes

cookie help needed

Recommend this page to a friend!

      Cookie Objects Class  >  All threads  >  cookie help needed  >  (Un) Subscribe thread alerts  
Subject:cookie help needed
Summary:How do I use the Class for a Jigsaw Puzzle game?
Messages:2
Author:Kyt Lue
Date:2007-03-14 15:57:11
Update:2007-03-14 21:00:52
 

  1. cookie help needed   Reply   Report abuse  
Picture of Kyt Lue Kyt Lue - 2007-03-14 15:57:11
I was wondering how to use the class in a Jigsaw Puzzle game. I don't know PHP at all.
1. Do I put a link on the jigsaw puzzle php page to all the files in the zip package?

2. Is there anything in the zip file I need to change so that it work with the Jigsaw Puzzle program?

I do have another cookie code I tried to get to work on the following php text file. You can ignore that.
The link to the Jigsaw puzzle php as a text file is:
tpgames.net/gaming/2/puzzlers/jponl ...

Thanks!

  2. Re: cookie help needed   Reply   Report abuse  
Picture of Guillermo de Jesus Perez Chavero Guillermo de Jesus Perez Chavero - 2007-03-14 21:00:52 - In reply to message 1 from Kyt Lue
Well, I’m imaging a Jigsaw Puzzle game… I don’t know how you are going to interact with it, maybe the movements with javascript or if you want to save the state of the game you can use this class….

1OOO //Row 1
OOOO //Row 2
OOOO
OOOO

$cookie_k = new CookieObjects("JigsawPuzzleGame",'Status');
$cookie_k->NewObject(); //Row 1
$cookie_k->addItem( "1" );
$cookie_k->addItem( "0" );
$cookie_k->addItem( "0" );
$cookie_k->addItem( "0" );
$cookie_k->NewObject(); //Row 2
$cookie_k->addItem( "0" );
$cookie_k->addItem( "0" );
$cookie_k->addItem( "0" );
$cookie_k->addItem( "0" );
….
$cookie_k->CreateCookie ( ...);


And so on…

Then you have save the status of your game….. After that you are able to read the cookie...

In the zip there is a little example...