Session variables from another PHP program...
Posted: Wed 6. Jul 2005, 23:18
Hello,
I made a php program which will allows my customers to see some information from my backoffice application. The main db resides in my office and a replicated db is dumped twice a week to the webserver.
So far so good. Now, I want to show my customers a login box in the frontend (done already), BUT I would like that if they get into the program and then they browse the rest of my phpwcms site (without login-out the php program), they could see a nice text (like Welcome Mr. Smith!) instead of the login box.
I tried to made the following changes in my phpwcms templates with no sucess (it seems that phpwcms use another session id):
(not exactly the following code... it is not a copy&paste... it's just what I can remember right now)
[PHP]
if ($_SESSION["smile_username"]) {
echo "Welcome! <a href="URL_TO_MY_PHP_PROGRAM">Get in!</a>";
} else {
// printing the login box.
}
[/PHP]
I think I could make it if I could somehow save my sessionid into the phpwcms session... Is it possible? How in earth?
TIA,
I made a php program which will allows my customers to see some information from my backoffice application. The main db resides in my office and a replicated db is dumped twice a week to the webserver.
So far so good. Now, I want to show my customers a login box in the frontend (done already), BUT I would like that if they get into the program and then they browse the rest of my phpwcms site (without login-out the php program), they could see a nice text (like Welcome Mr. Smith!) instead of the login box.
I tried to made the following changes in my phpwcms templates with no sucess (it seems that phpwcms use another session id):
(not exactly the following code... it is not a copy&paste... it's just what I can remember right now)
[PHP]
if ($_SESSION["smile_username"]) {
echo "Welcome! <a href="URL_TO_MY_PHP_PROGRAM">Get in!</a>";
} else {
// printing the login box.
}
[/PHP]
I think I could make it if I could somehow save my sessionid into the phpwcms session... Is it possible? How in earth?
TIA,