I'm having a bad day with sessions which hopefully someone can help me with.
A user logs in to my 'site' (script1.php) and I store relevant details in a session, all fine. I redirect to another page (script2.php) which checks and retrieves certain session values, all fine. My problem is with script3.php which happens to be within an iframe in script2.php. When the user is automatically passed to that page, from log in, the session details are not available but if the user makes a (menu) selection the session values are available to script3.php within the iframe. help ! Simplified code: script1.php <?php session_start(); [some code] $_SESSION['user'] = $_POST['user']; [some code] $hdr = "Location: script2.php?".SID; header($hdr); ?> script2.php <?php session_start(); if (!isset($_SESSION['user'])) Header("Location: ../index.htm"); << Does not redirect. [some code] <iframe name="content" src="script3.php"> Your browser does not support the use of frames. </ifame> [some code] ?> script3.php <?php session_start(); print_r($_SESSION); << outputs Array() [some code] ?> If you need any specific info on my config just ask and I'll try and supply it. TIA Graham -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php