session-variables

Transfer Session Variables

妖精的绣舞 提交于 2019-12-12 03:13:26
问题 I am trying to pass a vbscript session variable to my c# page. Upon research I found this page: Transfer Session Variables from Classic ASP to ASP.NET I don't know how to change my Int32 intresortID = Convert.ToInt32(Request.QueryString["TypeID"]); to read in the session variable in the same manner as from the code provided in the link above(pasted below:) <TITLE>ASPNETPage1.aspx</TITLE> <%@ Page language="c#" %> <script runat=server> // We iterate through the Form collection and assign the

MySIte immediately getting logged out for 2nd request

拟墨画扇 提交于 2019-12-12 02:45:38
问题 I am new to php. I am facing problem with sessions. I mean, after I get logged in and I click on any link in the website , its immediately getting logged out. Not sure why. In chrome console: I entered as : document.cookie , it showing me "", then I got to understand that cookie is somehow getting deleted immediately or some other issue. This problem exists for below 2 websites. We have a websites like : www.mysite.site1.com/folder1 www.mysite.site2.com/folder2 Below is my code of MySite.com

$_SESSION['user'] not working

若如初见. 提交于 2019-12-12 02:44:16
问题 SO this is the code for logging and and where I set things <?php session_start(); $_SESSION['user'] = "kjkj"; $_SESSION['pass'] = ""; $error = $user = $pass = ""; if (isset($_POST['user'])) { $user = sanitizeString($_POST['user']); $pass = sanitizeString($_POST['pass']); if ($user == "" || $pass == "") { $error = "Not all fields were entered<br />"; } else { $query = "SELECT store,c_pass FROM store WHERE store='$user' AND c_pass='$pass'"; if (mysql_num_rows(queryMysql($query)) == 0) { $error

not able to use request scope in the Spring config file

六眼飞鱼酱① 提交于 2019-12-12 02:26:58
问题 i am trying to use request scope in the spring file,but i am not able to do so, i am getting folllowing error.we are using spring security and session management.. After changing the scope I get the following error: Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'clientApp' threw exception; nested exception is org.springframework.beans.factory

how to access session variables from express and nodes js in function.js

China☆狼群 提交于 2019-12-12 02:09:50
问题 I am able to set and access session variables, like req.session.t1, etc. and all works fine on server side. On client side I have jquery installed on the front end and accessed by jade template. I have in functions.js: $(function(){ var t1 = req.session.t1; $('.results').append(t1); }); So as page/jade template loads, jquery does append the the data as outlined IF I use constants or a string, but session variables are undefined if I use req.session.x or session.x. So question is, how would I

Execute a twig variable inside another twig variable

血红的双手。 提交于 2019-12-12 02:07:37
问题 I'm working on a symfony2 project. In a file html.twig i have the following code: {{ app.session.get('menu') | raw }} that refers to a field in a database table contained in a session. The value of this field is : <div class="navbar"> <div class="navbar-inner"> <a class="brand" href="#">Menu1</a> <ul class="nav"> <li class="active"><a href="#">Home</a></li> <li><a href="{{ path('graphe') | raw}}">Graphe</a></li> </ul> </div> </div> Now at this point the menu is displayed perfectly, but when i

How do I know which user's session id has been expired (and which users are online?)

那年仲夏 提交于 2019-12-12 01:58:07
问题 I am developing an online chess game. After a user presses the login button, I save userid in a session variable: Session["userID"] = userId.Text; After assigning the variable, the user is transferred to another page. There is a possibility more then one user is online at a time. Let say three user are online at a time and in session variable one user contain "1" userId, next contain "2" and so on. If one of the user's Session Id expires for some reason, how do I know which user's session

Add new row to the table containing a drop down list on button click

瘦欲@ 提交于 2019-12-12 00:23:56
问题 I want to add a new row on button click to a table. New Row will have one textbox and one drop-down. Dropdown (select element)'s options to be added from session attribute. I am able to add textbox using following function. function addRow(btn) { var parentRow = btn.parentNode.parentNode; var table = parentRow.parentNode; var rowCount = table.rows.length; var row = table.insertRow(rowCount); var cell1 = row.insertCell(0); var element1 = document.createElement("input"); element1.type = "text";

Unable to set session variable in firefox and safari browser

落花浮王杯 提交于 2019-12-11 21:38:14
问题 I am setting the session variable using Ajax, its working fine in chrome but not working in safari and Firefox browser This is my Ajax method: add_action('wp_ajax_wdm_add_user_custom_data_options', 'wdm_add_user_custom_data_options_callback'); add_action('wp_ajax_nopriv_wdm_add_user_custom_data_options', 'wdm_add_user_custom_data_options_callback'); function wdm_add_user_custom_data_options_callback() { //Custom data - Sent Via AJAX post method $product_id = $_POST['custom_data_4']; $custom

set PHP's session without form submit

微笑、不失礼 提交于 2019-12-11 20:26:59
问题 I have a textarea with two buttons. One button will preview the text that I entered, and the other one submits the text to server. Here is my code: <?php session_start(); $_SESSION['ShortDescription']=''; if(isset($_POST['Submit'])) {...} ?> <form name="news" action="add_news.php" method="post"> <textarea rows="5" name="ShortDescription" id="ShortDescription"></textarea>&nbsp <input type="button" name="Preview" value="Preview Description"> <input type="submit" name="Submit" value="Submit"> <