lost session....

hey guys

I have a slight problem on a grid with a nested grid, once viewing this page the user session value gets lost. I have no events on either of the two grid forms and am now of course a little lost as to why this is happening.

Any ideas as to what could be going on?

Or maybe somebody could tell me if one storing the values in db would solve this, and two how I would accomplish that with ease for the app?
I do see a option during deploy to store values in the DB, but have no idea as to what is entered here, in which format or what data…

Some help would be appreciated to of course solve both, keep my session and possibly figure out or explain how to use the db store option :slight_smile:

Thanks in advance!

I am extremely impressed with your writing skills as well as with the layout on your blog. Is this a paid theme or did you customize it yourself? Anyway keep up the excellent quality writing, it’s rare to see a great blog like this one nowadays…

I am extremely impressed with you. Do you really think this is a blog or are you that lazy that you can only paste the text without reading it?
Banned! Reason: (Bad) Spam.

@jamieO

There is two functions on PHP: serialize() and unserialize(). The serialize() function transform any php variable into a string that can be stored on the database and recovered later with unserialize(), like this:


$my_var = array( ‘fruit’ =>'banana’, ‘spam’ => ‘ban’);
$store_var =
serialize($my_var);
//here comes the inssert on the base
sc_exec_sql(“insert into my_table values '”. $store_var."’ , ‘My Var’[B] ");

[/B]-------

Now you have the variable on the database. You can restore it by recovering the value from database and using unserialize():

sc_lookup(ds, "select value from my_table where name = [B]‘My Var’ ");
$my_var = unserialize({ds[0][0]});

[/B]
But I think we can work with Scriptcase Global Variables instead. did you already try it? Use [my_var] instead of $_SESSION[‘my_var’], I think it will work better.

Thanks Henrique for the reply :slight_smile:

I have been using the inbuilt globals to store all session variables, created a sceurity login by user and added a userid fieldto the db and also global variables.
This is displayed and functional on most pages, just when i come to two grids I have the session variables vanish.= and require me to log back in again to view any data.

I have how ever been having issues with scriptcase, ajax not functioning entirely, so random, buttons not working and various errors within the dev enviroment, am in the process of trying to replace and hopefully restore my projects.
I do hope that this is also the cause of the session loss.

If not I will come back to this post and see what the score could be.

thankx

so I have my backup back at long last and am still having problems with lossing the session, so the update/issue had nothing to do with the problem.

The session is logged during login and is stored allowing view of data, untill viewing a grid with a nested grid included. This happens when viewing any grid with a nested grid.
None of the grids viewed have any events or scripts running which would cause this.

Please either this is a bug or … I dont know but its simply not working as it should.

Once viewing any of these grids it requires the user to logout and lag back in again.

can we have a solution to this please as at the moment this scriptcase app is useless!