Topic: "PHP Sessions" (page 1 of 1)

1
Author Post
sniperkid
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
is there a limit to how many sessions u have because on my site i have a main one (username, pass etc) and i have the game BlackJack and that uses sessions but they dont like to work together. I dont want to use cookies because they are easy to change and bypass. Any way of getting it to work or should i get a new blackjack script :( ?

private message Website
unknown user
You can separate sections using objects as session vars.

$user=new User(); // User is a class representing a user
$user->Name="John";
$user->Surname="Doe";
... etc...

$black=new BlackJack(); // class representing your blackjack
$black->totPlayers=2;
... etc ...

Doing this you have just 2 session vars and should be easy to handle the code.
Cheers,
sfabriz
EMail

Topic: "PHP Sessions" (page 1 of 1)

1