Dear Forum, I've been doing php for sometime but just doing my first secure site. I am usign shared ssl from my webhost. I setup my pages and tested a paymennt system and the test is ok but now need to move the pages that contain personal info to the secure folder. However I find that I cant reference my regular folders from the secure folders and my session variables are not being read from the secure folder. That could make sense because the whole essense is security but how do I set this up? Do I have to make copies of all the files (eg css, javascript) that are needed to make the pages work? How do I ensure the session is accessible so that I can pass info (eg the fact that a user is logged in) back and forth between secure and non secure pages?

If you want the secure folder sessions to not be read from any other folder, then at the top of all your php files in the secure folder place the following code and it will make the session data in that folder only viewable within that folder.

<?
session_name("srmcvkdoejh48fo4mnf8");
session_start();
commented: Nice one cwarn23, that's relly useful +3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.