Sessions and Cookies - PHP

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
MadneM
Forum Newbie
Posts: 4
Joined: Wed Mar 02, 2005 4:02 am

Sessions and Cookies - PHP

Post by MadneM »

Hey, I'm developing a script using frames - no comments please....

and i basically need to be able to use sessions or cookies to store temporary data in, however due to the restraints on the session and cookie functions ie, cant initiate after output has already been sent, how can i possibly get either cookies or session variables to work? I know i could store my data in a database but then that produces lag and unnecesarily stored data, anybody found a way round this or can think of a different way to store this temporary data?

Thanks

MadneM
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

solve the issue of why you can't get sessions/cookies after output starts:

viewtopic.php?t=1157


Someone will no doubt say something about ob_start() (output buffering). Which is a band-aid approach to the problem.
Post Reply