I need some help with the following please.
Suppose I have file1.php in the PN main directory.
file1.php contains the basics of the PN framework, in this manner:
Quote
include 'includes/pnAPI.php';
pnInit();
include 'includes/legacy.php';
if(!IsSet($mainfile)) { include ("mainfile.php"); }
include("config.php");
include("header.php");
OpenTable();
*** my stuff here ***
CloseTable();
include("footer.php");
In file1.php, I can use PN functions such as pnSecAuthAction, pnUserVars, etc...
Now I have also file2.php, located in the same PN root dir as file1.php.
I want to call file2.php from file1.php using an Iframe:
Quote
include 'includes/pnAPI.php';
pnInit();
include 'includes/legacy.php';
if(!IsSet($mainfile)) { include ("mainfile.php"); }
include("config.php");
include("header.php");
OpenTable();
CloseTable();
include("footer.php");
In file2.php I also need the functions of the PN framework, but file2 does not recognize the logged in user, regardless if I include in file2 the PN includes or not.
I suppose this is normal behavior for Iframes, but is there a way around it, and have my user properly identified by file2.php as being logged in?
I think, since both files are on my site, the PN cookie should be readable also by file2?
If so, why isn't the user logged in inside the iframe, if he is logged in in the parent frame?
Is there a way to get the user to be logged in inside the iframe?
I have to use an Iframe for what I want to achieve.
I would appreciate any help.
P.S.
Posting full code snippets to the forum, including the PHP tags, somehow does not work
