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
https://forums.phpfreaks.com/topic/71641-password-protect-through-iframe/
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.