Hi,
I've been prowling around this site and over at the official php site looking for the answere to this question, and not finding the answer. Forgive me if it's everywhere and I'm just not seeing it.
I'm working on a content management system for a client's website and having them log in as an administrator in the secure_html folder on the virtually hosted site. Then that will unlock an edit button on all the pages of the site, located in the public_html folder.
I've been able to make this work if both files are in the public area, but not with secure login.
The problem has to do with the url's. The host uses the server name for https urls and domain name for the http urls. The session variables work in the public area if I use the server name instead of the domain name!
QUESTION: How do I set the path when I initiate the session so I can use the domain name in the url?
I kinda need you to be explicit, because I stink at this! Here's test code I'm using:
https://server.host.net/~user/page1.php
session_start();
$admin = "John Doe";
session_register("admin");
http://www.domain.com/page2.php
session_start();
$admin_name = $admin;
echo $admin_name;
BTW, I tried puting this line of code at the top of the secure login based on a post I found online, but it didn't work:
ini_set ("session.cookie_domain" ,".domain.com" );
Thanks,
Randy