Jump to content

Recommended Posts

I'm working on a very large system that I only have partial access too. The bods with full access are out if the office today and I'm having a few problems.

 

I need to take a URL from an email that contains vars in the URL string and go to a login page. The user must log in then get taken to a page where the vars are used.

 

I don't have access to the parent frameset page, only the page within the frame set. I figured I could go to the login page (the URL of the page within the frameset) eg

 

www.site.com/login.php?test=1

 

and write to the session like this

 

Here's an example if 'test' was in the URL

if(isset($_GET['test'])){
$_SESSION['emailed']['test1']=$_GET['test'];
}
<?
}
$_SESSION['emailed']['test2']="test";

 

then bounce the frameset before any output using

<script>
if (parent.location.href == self.location.href){
    window.location.href = '/'
}
</script>

 

test2 is available after the page is bounced to the parent frameset but test1 is gone.

 

If I don't bounce the page both test vars are available.

 

Any idea where I might be going wrong?

Link to comment
https://forums.phpfreaks.com/topic/55314-framesets-variables-and-sessions/
Share on other sites

well first of all you might wanna change

this:

if(isset($_GET['test'])){
$_SESSION['emailed']['test1']=$_GET['test'];
}
<?
}
$_SESSION['emailed']['test2']="test";

to:

<?
if(isset($_GET['test'])){
$_SESSION['emailed']['test1']=$_GET['test'];
}
$_SESSION['emailed']['test2']="test";

and im not sure exactly what you want to do

well im a noob

thats why

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.