Session not always being picked up
I have a page that stores a value from a recordset in a session to help send people back to the page they were on after they log in.
Details below....
I have a page that stores a value from a recordset in a session to help send people back to the page they were on after they log in.
Details below....
your rs_Lodge recordset is using INNER JOIN, this means it will only return a result if there is a match in all tables, try using LEFT OUTER JOIN instead.
Thanks Jason - I tried that with no luck.
I realised I didn't need the country in that recordset, so have taken out the join altogether, still with no luck.
Revised copy attached.
i added an if statement to set the session only if the RS is not empty:
<?php
session_start();
if($row_rs_Lodge['GSG_URL'] != "") {
$_SESSION["Lodge_GSG_URL"] = "".$row_rs_Lodge['GSG_URL']."" ;
session_commit();
}
?>
that seams to have fixed it.
Thank you Jason - not sure why, but with that the log in broke.
But I tried it without the commit line, and it fixed that.
So don't know what happened there, but all seems OK now.
ok, glad to hear it is working.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.