is there anyway for placing a session in include that is in the middle of the page e.g
include("1.php");
include("2.php");
include("3.php"); # This include contains session_start();
The reason I want to do this is because, 3.php will be dynamically loaded into the page multiple times. After the first load, it doesn’t recognize the session.
Start your session in the page that has the includes and the populate the session vars in include3.
The session start needs to be the first thing outputted to your browser otherwise you will get the headers error.