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,
Session variables from another PHP program...
Hi Will,
If you are using the dev versions of wcms, don't forget the session_name parameter:
session_name('hashID');
session_start();
I had formerly deved a custom session app in earlier versions of wcms, where session_name was not declared in index.php....once I upgraded to newest version...i needed to declare this to get the scripts working.
One idea in debugging is to place:
echo "<pre>";
print_r($_SESSION);
print_r($_POST);
echo "</pre>";
where you think it appropriate....for tracking
just a couple of ideas..
not sure if they are any help...

If you are using the dev versions of wcms, don't forget the session_name parameter:
session_name('hashID');
session_start();
I had formerly deved a custom session app in earlier versions of wcms, where session_name was not declared in index.php....once I upgraded to newest version...i needed to declare this to get the scripts working.
One idea in debugging is to place:
echo "<pre>";
print_r($_SESSION);
print_r($_POST);
echo "</pre>";
where you think it appropriate....for tracking
just a couple of ideas..
not sure if they are any help...
