PDA

View Full Version : PHP Frame Check


ItsMe
03-31-2005, 04:12 PM
I dont know if this is possible in PHP but hopefully someone can point me in the right direction.

I have a few pages built in frames and the only page that changes is the main content frame, all the others are fixed.

What i want to do is ensure that the main content pages are only viewable within the frames. So if anyone tries to go to the address of the main page, it forwards to the index page with all the menus and other frames - the user can then navigate around the site.

I hope you understand what im saying and hopefully you can help.

Thanks in advance,
Andrew
AKA ItsMe

ItsMe
03-31-2005, 04:27 PM
If this is not possible, please let me know!

marek_mar
03-31-2005, 04:28 PM
You can do it with sessions. The main page (the one that holds the frames) starts the session. All other pages check if the session is set. If not they'll redirect/show a link to the main page.

ItsMe
03-31-2005, 05:31 PM
Can someone guide me through implementing sessions, as this is something i have never done before.

Thanks

marek_mar
03-31-2005, 05:45 PM
You should read the php manual (http://www.php.net/session) about sessions. It has also examples on how to use them.

ItsMe
03-31-2005, 06:08 PM
Thanks, i will look at it and review.