session-variables

How to retrieve HTML and variables with jQuery/Ajax and PHP

I have an HTML form which uses selections from a drop-down list to populate a mySQL table, but with jQuery / AJAX calling an external php file to update the display of entered lines below the original form. The purpose of the form is an order entry system, and as such works: select an item, see it added to the list. The problem that I ...

session variables lost in a specific scenario

Hello, I've got a problem losing session variables in an ASP/VB.NET application. The application allows searching for an item or it can show an item if provided with a unique link (in the browser). It holds information about the item in session variables. In the webpage showing an Item a user can click a button which opens a window...

Passing sessions variables through an iframe, php

Hi! First timer to the site, not an overly experienced php programmer here :) I have a problem, i am using an iframe within a site which im attempting to use a session variable inside, firstly ive just been trying to display the session variable to make sure they are accessible from within the iframe: echo "session of productcheck...

How to get ELMAH to include session values?

NOTE: I know the various reasons to avoid using the session, but this is a project I've inherited, so please skip that part of any replies :) Since it's a solved problem, I'm hoping someone can point to an ELMAH patch/branch/fork that includes logging session data rather than reinventing the wheel. One weird thing is an older post from...

PHP redirection problem in IE when using session variables

I have a small website that works like below 1) User goes to the login page and enters the credentials (call it page1) 2) The form gets posted to page2, which authenticates the user, calls session_start and then sets a session variable with $_SESSION['somevar'] and redirects to the page3 3) On page3 , I check if the $_SESSION['...

PHP Sessions Issue

Hey Guys, I am having one hell of a problem that I cannot figure out for the life of me. I have set up a super simple CMS for a client. Each different page of the CMS has and include file called session.php. session_start(); $username = $_SESSION['siteadmin']; if (!$_SESSION['siteadmin']){ header( 'Location: login.php?status=2' );...

JSF - Accessing a SessionScoped managed bean

I'm quite new in JSF and I'm doing some basic things to get a feeling of how one should work with it. In my one of the projects I have a ManagedBean, SessionScoped like below @ManagedBean(name="user") @SessionScoped public class User implements Serializable // Having a couple of String properties (with setters and getters). Now, in on...

Trying to convert Global.asax 1.0 file to 3.5 Issues with Application_Error + Session and Redirect...

So in the Global.asax is this: protected void Application_Error(object sender, System.EventArgs { Session["CustomError"] = Server.GetLastError(); Server.ClearError(); Response.Redirect("~/ErrorPage.aspx"); } And in ErrorPage.aspx is this: private void Page_Load(object sender, System.EventArgs e) { Excep...

strongly typed sessions in asp.net

Pardon me if this question has already been asked. HttpContext.Current.Session["key"] returns an object and we would have to cast it to that particular Type before we could use it. I was looking at various implementations of typed sessions http://www.codeproject.com/KB/aspnet/typedsessionstate.aspx http://weblogs.asp.net/cstewart/archiv...

PHP Application guarantee no re-post

Hi All, I might not have known what to search for to get this answer so please point me to the correct post if this has been dealt with already. Now then, I have a little custom CMS and I want to ensure users don't re-submit their $_POST data by refreshing the page. So I've done something like this: <? //Start a session to hold v...

Session values null after redirect except when running in VS Debug mode

I have an ASP.NET web application that takes user input across several forms. Sort of like a wizard. On the first form, the user enters information then clicks the "Next" button. In the Click event of the button I save some information to the Session object (via Properties in the Master page). I then Redirect to the next page. Here ...

Can I store a Scripting Dictionary in a session variable?

I have a classic ASP site where I create a dictionary when the user logs in and then stores that dictionary in a session variable like so... dim objDict set objDict = server.createobject("scripting.dictionary") ' processing here to fill dictionary set session("user") = objDict That all works fine and dandy but when I navigate to anoth...

PHP: Local vars interfere with $_SESSION vars?

Hi, The output of the following code on a random page is : print $_SESSION['uid']; // logged in user // Get Data . $uid = $_GET['ID']; // part of random page processing print $_SESSION['uid']; is : 1 2 My logged in User ID is changing ! :@ The code for the login (authenticate) page is some...

Sharing Data between Web Applications

We have a large WebForms application here that we would like to port over to mvc piece by piece. I'd rather not have a co-mvc/webforms solution but would rather create a brand new mvc application which can be called from our webform application and which can call our webform application. the problem lies in sharing information between ...

Print all session/post/get variables in ASP.NET page

I am very new to ASP.NET, I'm quite used to PHP (which we unfortunately do not use at work) I'd like to print all the session variables. In PHP it's quite easy, I use: echo '<pre>' . print_r($_SESSION, true) . '</pre>'; for this, but is there an as-easy ASP.NET equivalent? ...

mysql_real_escape_string() for $_SESSION variables necessary?

Hi, Should I use the mysql_real_escape_string() function in my MySQL queries for $_SESSION variables? Theoretically, the $_SESSION variables can't be modified by the end-user unlike $_GET or $_POST variables right? Thanks :) ...

asp.net mvc session?

Im building an admin interface for a medical records management app. My client has asked me for a way to easily select the patient the user wants to work with without having to select the patient everytime he wants to perform an action. So, say for instance he wants to store a record for the patient's current status (weight, size, etc) a...

Unable to retrieve session value

Hi all, On page load I am populating my own list object, storing in session & it is getting stored, When I am debugging i can see that list object is stored in session, But When I am reading that session variable in next page, it's throwing error like The type 'Dispensary.ResourceScheduling.Views.SchedulingPopup' exists in both 'WebApp...

Is a variable stored in Session deserialized once or multiple times throughout a page lifecycle?

I would like to wrap Session variables in a manner similar to that discussed on CodeProject. public static class WebSession { private const string CurrentUserKey = "CurrentUser"; private static HttpSessionState Session { get { return HttpContext.Current.Session; } } public static bool Exists { get { return Session ...

hyperlink in asp.net that takes the value to the next page

im using asp.net with vb.net in backcode. On my first page, i diplay names of all employees. I want to give that a hyperlink, that when clicked upon shall open the next page with say a querystring and opn only that employees records. Also I want the save the employeeid (which is not shown on page 1) on the second page, cause when i do up...