Jump to content

Password protect through Iframe


ketant

Recommended Posts

Hi,

 

Basically I have 2 separate sites.

 

On site 1, I have index.htm which has an iframe that links to content.php on site 2.

 

Site 1 is password protected.  What I'm trying to do is only access to content.php on site 2 only if you are logged into site 1.  Currently if you go to content.php it by passes site 1 and allows access.  I'd want it to redirect to site 1 and ask the user to login, and also only open content.php in the iframe.

 

Any help would be appreciated.

 

 

 

 

Link to comment
Share on other sites

use seeions with session_start() at the very top of every page as this should transfer the sessions via the iframe and you can check they are logged in before showing the content.

 

you set sessions values using $_SESSION['sessionname']='value of the sessionname';

 

Regards

Liam

Link to comment
Share on other sites

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.