List Info

Thread: Tracking session from the top page into the inner frame




Tracking session from the top page into the inner frame
user name
2007-12-16 21:47:34
Hi!

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?

Please help me out.
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development
staff at 360 PSG. An enterprise application development
company utilizing open-source technologies for todays
small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the
Google Groups "Professional PHP Developers"
group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to
Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---


Re: Tracking session from the top page into the inner frame
user name
2007-12-16 22:02:57
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 < contactojasgmail.com">contactojasgmail.com> wrote:

Hi!

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?

Please help me out.



 

--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---

Re: Tracking session from the top page into the inner frame
user name
2007-12-17 03:19:17
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:

index.php:

<?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?

Ojas

On Dec 17, 9:02 am, mkeefe <mke...gmail.com> 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 <contacto...gmail.com> wrote:
>
>
>
> > Hi!
>
> > 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?
>
> > Please help me out.
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development
staff at 360 PSG. An enterprise application development
company utilizing open-source technologies for todays
small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the
Google Groups "Professional PHP Developers"
group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to
Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---


Re: Tracking session from the top page into the inner frame
user name
2007-12-17 03:35:14
If these files are all on the same server it shouldn9;t matter if the content is framed or not.

PHP will globally share a session based on the browser and domain name.

.. or am I missing something still?

Matt

On 12/17/07, Ojas < contactojasgmail.com">contactojasgmail.com> 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:

index.php:

<?php
  ; &nbsp; &nbsp; &nbsp;$err = '';

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

  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; // Checking for authentication
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;some php code....
&nbsp;   ; &nbsp; &nbsp;}

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

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?

Ojas

On Dec 17, 9:02 am, mkeefe < mke...gmail.com">mke...gmail.com > 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.
&gt; 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 < contacto...gmail.com"> contacto...gmail.com> wrote:
>;
>
>
> > Hi!
>
&gt; > 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
&gt; > frames, how can inner frame (script) know that the authorization has
> > been done?
>
> > Please help me out.



 

--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---

Re: Tracking session from the top page into the inner frame
user name
2007-12-19 08:39:03
What about sticking session_start(); into script  - it's
like Header()
so stick it before any output

On 17 Pro, 10:19, Ojas <contacto...gmail.com> 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:
>
> index.php:
>
> <?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/><b
r/><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?
>
> Ojas
>
> On Dec 17, 9:02 am, mkeefe <mke...gmail.com> 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 <contacto...gmail.com> wrote:
>
> > > Hi!
>
> > > 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?
>
> > > Please help me out.
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development
staff at 360 PSG. An enterprise application development
company utilizing open-source technologies for todays
small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the
Google Groups "Professional PHP Developers"
group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to
Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---


[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )