close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Session Variables Problem

Thread began 9/05/2009 2:11 am by Daryl | Last modified 9/08/2009 2:45 pm by Jason Byrnes | 3153 views | 10 replies |

DarylBeta Tester

Session Variables Problem

I have added a session variable to my login page after creating a new database column.

I did this using SA by clicking on both of the the SecurityAssist Authenticate User Behaviour (I have auto login too)

I have checked the code on the page and the same code exists for this column as it does for the other columns.

On the index.php page (the page that you go to after logging in) I have various session variables displaying (Name etc) and have also used other session variables to show or hide regions.

The problem that I have is that this new session variable is not appearing on the page when I 'echo' and also is not working with show regions.

I would therefore guess that it is not being sent to index.php, or if it is the page isn't collecting it.

Have Imissed out a step?

I have been through all of the Solution Recipes now (Thanks Jason) and have confirmed that I have completed all of the steps in them.

Sign in to reply to this post

DarylBeta Tester

This is the code on the login page

"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"id".$WA_Auth_Separator."f_name".$WA_Auth_Separator."s_name".$WA_Auth_Separator."unit".$WA_Auth_Separator."auth".$WA_Auth_Separator."web_admin".$WA_Auth_Separator."position".$WA_Auth_Separator."lsdogs_sec".$WA_Auth_Separator."unit_admin".$WA_Auth_Separator."a_co".$WA_Auth_Separator."assessor".$WA_Auth_Separator."lsdogs_chair".$WA_Auth_Separator."lsdogs_tre".$WA_Auth_Separator."un".$WA_Auth_Separator."pw".$WA_Auth_Separator."news"),
"sessionNames" => explode($WA_Auth_Separator,"id".$WA_Auth_Separator."f_name".$WA_Auth_Separator."s_name".$WA_Auth_Separator."unit".$WA_Auth_Separator."auth".$WA_Auth_Separator."web_admin".$WA_Auth_Separator."position".$WA_Auth_Separator."lsdogs_sec".$WA_Auth_Separator."unit_admin".$WA_Auth_Separator."a_co".$WA_Auth_Separator."assessor".$WA_Auth_Separator."lsdogs_chair".$WA_Auth_Separator."lsdogs_tre".$WA_Auth_Separator."un".$WA_Auth_Separator."pw".$WA_Auth_Separator."news"),

The variable that I am calling is called 'news' which is obviously there

on the index.php the code that I am using to call that variable is;

<?php echo $_SESSION['news']; ?>

The variable f_name is working when I call it in the same way;

<?php echo $_SESSION['f_name']; ?>
Sign in to reply to this post

DarylBeta Tester

This is now happening with another session variable that I have set from the login page using the SA Authentication Behaviour method.

Neither of them are being submitted.

Are there any other files (other than the LogIn.php) that are updated when a new session variable is set using SA?

Sign in to reply to this post

DarylBeta Tester

I have added the complete code below.

Thanks again for anyone that can help

Attached Files
Sign in to reply to this post



Just to be sure the sessions are all making it to the index page, I would also add a session_start command to that page... sometimes, PHP is not so good at maintaing sessions. After you try that, let me know what you come up with and I will see if I can dig into the code, further.

Best regards,


Sign in to reply to this post

DarylBeta Tester

Hi Brian

Thanks for your reply (and also for your comment on another thread about this being a holiday weekend in the US).

I already have


if (!isset($_SESSION)) {

at the top of my login page.

I was a bit confused as to which page you were saying I should add it to, so have tried adding to the index page also.

I have also tried



in various combinations on both the login and index pages.

Does this help?

Sign in to reply to this post

Jason ByrnesWebAssist

To see all of the sessions that are being created on login, add the following to your index page in the body:

<pre><?php var_dump($_SESSION); ?></pre>

This will show a listing of all of the session variables that are set and the values. Double check that this list includes the names of the session variables in question.

Sign in to reply to this post

DarylBeta Tester

Thats a useful bit of code! Thanks Jason...

The Variables that are being sent are;

  id, f_name, s_name, unit, auth, web_admin, position, lsdogs_sec, unit_admin, a_co, assessor, lsdogs_chair, lsdogs_tre, un, pw  

But I have set the following ones in addition to be sent;

  news, email  

The first batch were those created by Security Assist at first setup. The other two were set using Security Assist after the page was created.

The code on the page that I assume sets the sessions includes the two that I want in the same places as all the others.

Is there another file somewhere that also holds this information that might not have been updated or is there another reason why they might not be sent?

below is the code that I assume is to do with Sessions;


$WA_Auth_Parameter = array(
"connection" => $lsdogs,
"database" => $database_lsdogs,
"tableName" => "users",
"columns" => explode($WA_Auth_Separator,"un".$WA_Auth_Separator."pw"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["username"]))?$_POST["username"]:"")  ."".$WA_Auth_Separator."".((isset($_POST["userpassword"]))?$_POST["userpassword"]:"")  .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"id".$WA_Auth_Separator."f_name".$WA_Auth_Separator."s_name".$WA_Auth_Separator."unit".$WA_Auth_Separator."auth".$WA_Auth_Separator."web_admin".$WA_Auth_Separator."position".$WA_Auth_Separator."lsdogs_sec".$WA_Auth_Separator."unit_admin".$WA_Auth_Separator."a_co".$WA_Auth_Separator."assessor".$WA_Auth_Separator."lsdogs_chair".$WA_Auth_Separator."lsdogs_tre".$WA_Auth_Separator."un".$WA_Auth_Separator."pw".$WA_Auth_Separator."news".$WA_Auth_Separator."email"),
"sessionNames" => explode($WA_Auth_Separator,"id".$WA_Auth_Separator."f_name".$WA_Auth_Separator."s_name".$WA_Auth_Separator."unit".$WA_Auth_Separator."auth".$WA_Auth_Separator."web_admin".$WA_Auth_Separator."position".$WA_Auth_Separator."lsdogs_sec".$WA_Auth_Separator."unit_admin".$WA_Auth_Separator."a_co".$WA_Auth_Separator."assessor".$WA_Auth_Separator."lsdogs_chair".$WA_Auth_Separator."lsdogs_tre".$WA_Auth_Separator."un".$WA_Auth_Separator."pw".$WA_Auth_Separator."news".$WA_Auth_Separator."email"),
"successRedirect" => "index.php",
"failRedirect" => "",
"gotoPreviousURL" => TRUE,
"keepQueryString" => TRUE
Sign in to reply to this post

Jason ByrnesWebAssist

make sure that the updated login page is actually uploading to the server.

Try deleting the login page form the server than uploading it again. It sounds like your changers aren't making it up.

Sign in to reply to this post

DarylBeta Tester

How bizzare!

Thanks for that all working now!!

Jason - some of the other forums have the ability to edit the original title of a post or select on a menu that an item has been solved or resolved - just think that it might be useful here, but I guess you guys are too busy bailing us out!!

Thanks again.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

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.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...