maintain state

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ridwan
Forum Commoner
Posts: 55
Joined: Thu Aug 22, 2002 3:15 am

maintain state

Post by ridwan »

i need some of my variables to maintain state within a case statement is this possible ??
User avatar
cybaf
Forum Commoner
Posts: 89
Joined: Tue Oct 01, 2002 5:28 am
Location: Gothenburg Sweden

Post by cybaf »

the usual way of maintaining state is to use sessions or cookies.

If I'm reading your question right you are trying to save the state with some variables in a:

Code: Select all

switch($var) {
case 'something':
echo "something";
break;
}
right?

if this is the case I think that you should reconsider your solution. otherwise try to implement sessions to your code.

regards,
//Anders
ridwan
Forum Commoner
Posts: 55
Joined: Thu Aug 22, 2002 3:15 am

i cant use sessions

Post by ridwan »

I'll just have to figue out another solution, thanx 4 ur assistance anyway :wink:
Post Reply