atom feed3 messages in com.googlegroups.professional-phpRe: Tracking session from the top pag...
FromSent OnAttachments
OjasDec 16, 2007 7:47 pm 
OjasDec 17, 2007 1:19 am 
smaj...@gmail.comDec 19, 2007 6:39 am 
Subject:Re: Tracking session from the top page into the inner frame (
Date:Dec 19, 2007 6:39:03 am

What about sticking session_start(); into script - it's like Header() so stick it before any output

On 17 Pro, 10:19, Ojas <> wrote:

Thanks for the reply, but i am aware of all this stuff. I am not asking for the way session is to be created, what actually i need to track the session under the inner session if it is existing under the parent file. The parent file code is as follow:


<?php $err = '';

if($_POST['posted'] == 'posted') { // Connecting to the mysql. some php code....

// Checking for authentication some php code.... }

if(!$_SESSION['loggedin']) { ?> <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Web interface</title> <meta name="Author" content="Ojas"> </head> <br/><br/><br/><br/><br/><br/><br/><div id="errdiv"
align='center' style="color:red; height: 40px;"><b><?php echo ($err) ? $err : "&nbsp;"; ?></b></div> <form action='index.php' method='POST' name='frmlogin' autocomplete="off" style="margin: 0px; pading: 0px;"> <input type="hidden" name="posted" value="posted"> <table cellpadding=0 cellspacing=1 border=0 width=400
align='center' style="background: #999999; color: #ffffff"> <tr> <td width=20></td> <td colspan=3 align='center' height=50><b>Please
login to access.</ b></td> </tr> <tr> <td width=20></td> <td><b>USERNAME:</b></td> <td width=5></td> <td><input type='text' class='textstyle'
name='username' MAXLENGTH=30> </tr> <tr> <td width=20></td> <td><b>PASSWORD:</b></td> <td width=5></td> <td><input type='password' class='textstyle'
name='password' MAXLENGTH=30> </tr> <input type='hidden' name='userid'> <tr><td colspan=4 height=10></td></tr> <tr> <td width=20></td> <td colspan=3 align='middle' height=50><input
type='submit' class='buttonstyle' value='Login' name='Submit'></td> </tr> </table> </form> </html> <?php } else { ?> <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Web Interface</title> <meta name="Author" content="Ojas"> </head> <frameset rows="35,*,40,135"> <frame src="builder/top.php" frameborder="no"> <frame src="builder/config.php" name="DataFrame"
frameborder="no"> <frame src="builder/actions.php" name="ActionFrame"
scrolling="no" marginwidth="0" marginheight="0" frameborder="no"> <frame src="builder/blank.html" name="OutputFrame"
marginwidth="0" marginheight="0" frameborder="yes"> </frameset> </html> <?php } ?>

As you can see the inner frames are in the "builder" frames. What i need is to let know whether the session has been created inside index.php, while being under builder/actions.php file?

On Dec 17, 9:02 am, mkeefe <> wrote:

Store a session using $_SESSION and any file on the same server will have access to that data. Beware that sessions can be forged with the proper exploits, but they are secure enough for most uses. Also, make sure you use session_start() before any output "html" or else you will encounter a "Headers already sent" error.

On 12/16/07, Ojas <> wrote:


I am having a problem in tracking the session from the top page to the inner frame. Actually i have developed an application which has been made to be accessed after authorization. Since the authorization is happening at the top page and that page is consisting of several frames, how can inner frame (script) know that the authorization has been done?