session-variables

PHP/ MySQL: What is the best way to get filtered data from a database that has been inputted by a logged in user?

I am trying to create a page that displays a preview of all the data that each individual user has put into the database. Each user must only be able to see their own data. I have been using $SESSION's to post which logged in user is inputting what, and have tried to get my brain to think about the reverse action. I first wondered whe...

session_set_cookie_params on multi-domain sites

Hi! I'm currently developing for an application (www.domain.se, .eu) where we're experiencing problems with sessions not propagating across domains. Internet Explorer is the root cause of this, as it will differentiate sessions depending on whether we're typing in "domain.se" or "www.domain.se". Due to some unfortunate redirecting, we're...

How to retrieve selected value from the dropdown list in asp.net and store it in session variable??

the dropdown list is showing data from database, but how to retrieve the selected value and store it in a session variable?? ...

php sessions in database only writing part of information to the table...

UPDATE (Added the code for the class that does the read/write) <?php error_reporting(E_ALL); class dbSession { function dbSession($gc_maxlifetime = "", $gc_probability = "", $gc_divisor = "") { if ($gc_maxlifetime != "" && is_integer($gc_maxlifetime)) { @ini_set('session.gc_maxlifetime', $gc_maxlifetime); ...

Selectively prevent Session from being created

In my app, I have an external monitor that pings the app ever few minutes and measures its uptime / response time Every time the monitor connects, a new server session is created, so when I look at the number of sessions, it's always a minimum of 15, even during times where there are no actual users. I tried to address this with putt...

How to configure a session timeout for Grails application?

In one of controllers in my Grails application I'm preserving a parameter value in a session variable like this: session.myVariable = params.myValue After that, I can access the saved value from different controllers/GSP-pages as long as I actively use the app. However, if I don't use my app for a while, even though my browser win...

How to remove sessionvariable when closing popup window?

I have a popup window where i store an a arraylist in sessionvariable, when clicking on closebutton (the X in the right top corner) or the cmd input button in the form i want to remove the sessionvariable containing my arraylist. How can i do this? The popup window is currently closed by a javascript: function cmdClose_onclick() { ...

How can i read back an object stored in a session?

First of all, here comes the load part. Structure MainStruct Dim Ans1 As String Dim Ans2 As String End Structure Dim Build As New List(Of MainStruct) ... ... ... Session("MyData") = Build The question is how can i read back the contents of the list, stored in the Session? I mean something like... Build = Session("...

Inconsistent Session data from IE - cached sessions???

I'm trying to prevent some basic click-fraud on my site, and am building links based on session time data. Everything works in FF, but in IE the information I'm storing in the session is somehow being changed. When I load up the main page, I set my session variables like this session_start(); $_SESSION['time']=time(); I'm out putt...

Best way to carry & modify a variable through various instances and functions?

I'm looking for the "best practice" way to achieve a message / notification system. I'm using an OOP-based approach for the script and would like to do something along the lines of this: if(!$something) $messages->add('Something doesn\'t exist!'); The add() method in the messages class looks somewhat like this: class messages { ...

How does this Singleton-like web class persists session data, even though session is not updated in the property setters?

Ok, I've got this singleton-like web class which uses session to maintain state. I initially thought I was going to have to manipulate the session variables on each "set" so that the new values were updated in the session. However I tried using it as-is, and somehow, it remembers state. For example, if run this code on one page: User...

Accessing HttpApplication.Application variables from a class

I set up various global parameters in Global.asax, as such: Application["PagePolicies"] = "~/Lab/Policies.aspx"; Application["PageShare"] = "/Share.aspx"; Application["FileSearchQueries"] = Server.MapPath("~/Resources/SearchQueries.xml"); ... I have no problem accessing these variables form .ascx.cs or .aspx.cs file -- ie. files that ...

how to pass session variable to model in RoR?

I used a global variable in my app for passing information before. But I got a problem and thanks everyone here suggested me to store those data in session with database. I tried, but I found that I can't access the session variable in Model. I googled and knew this is the Model normal behavior, RoR won't pass the session variable to Mo...

Does http and https will share the same sessions

I am building a web application and I need to know whether I can share the Same session or not between http or https? ...

adding items to shopping cart before login

i have a user system i wrote addin a session("userid") to identify a logged in user. but i want to allow adding stuf to the shopping cart. so upon press of "add to cart" a new order is started in my database. but how can i tie the current unlogged user to that order number? i was thinking of logging some session("unknownuserid") and bi...

HttpSessionState Where, How, Advantages?

You see the code below, how I did use the session variable; So the three questions are: Where are they stored? (Server or Client side) Are they unique for each web page visitor? Can I remove it using ajax or simple js code when my job is done with it? or it will be removed automatically..? . sbyte[][] arrImages = svc.getImagesForFi...

How to pass session values to a subdomain in asp.net

Hi, I would like to know the method of passing session variables/values to a subdomain from the main website. For eg : Upon user login, I would like to set some session variables and redirect the page to a subdomain URL. How can this be done? fyi... I have setup two websites in IIS. One is localhost and the other is subdomain.localh...

ASP.NET; Several session variables or a "container object"?

I have several variables that I need to send from page to page... What is the best way to do this? Just send them one by one: string var1 = Session["var1"] == null ? "" : Session["var1"].ToString(); int var2 = Session["var2"] == null ? 0 : int.Parse(Session["var2"].ToString()); and so on... Or put them all in some kind of container-...

Using PHP session variable in perl

Can I use a session variable that I have created with php in perl? ...

CakePhp Routes & Session Variables

Is there an intrinsic reason why I can't, in routes.php, route a user based on the contents of a session variable? e.g. Router::connect('/dashboard', array('controller'=>'users','action'=>'dash',1) ); works okay, but, replacing the 1 with $_SESSION['userid'] doesn't. Am I missing something important about session variables here?...