sessions in include files not working

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
reecec
Forum Contributor
Posts: 218
Joined: Sun Apr 02, 2006 7:12 am

sessions in include files not working

Post by reecec »

Hi all,

I have a script that uses two include files both using sessions it doesnt seem to like it as the header as already been sent in first file.

is there anyway to end the session in the first file once it has ended


Thanks reece
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

You only need to initiate the session once, somewhere before those two files are included. The included files will be able to see the session.
reecec
Forum Contributor
Posts: 218
Joined: Sun Apr 02, 2006 7:12 am

Post by reecec »

Thanks that worked
Post Reply