Jump to content

[SOLVED] quick session question...


ag3nt42

Recommended Posts

hello again all,

 

quick question about sessions.

 

I've created a session and I "gather" that in order to use the session across multiple pages,

I need to place "session_start()" at the head of every page..

 

Which I had this working before but now i'm getting this error:

Notice: A session had already been started - ignoring session_start() in mypath\admin.php on line 2

Link to comment
https://forums.phpfreaks.com/topic/109785-solved-quick-session-question/
Share on other sites

yea I'm starting the session on the first line of index.php

 

then about 15 lines down from that i'm "requiring" admin.php

based on wether or not you've passed some checks for admin permissions.

 

I thought that if I didn't have session_start on the included page it wouldn't carry over the session data but it is .. so i don't need the second sessions start on the include page..

 

to get around the checks I did a reference back to the permissions variable..

I was scared it would not pass the check and still out put the rest of the html on the page...

but it stops the whole page soo.. the permission variable checks seems to be enough.

 

thankx for the help revraz :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.