session-variables

Modifying MySQL table on different pages with scores from a HTML form

若如初见. 提交于 2019-12-25 06:43:39
问题 In regard to this question How to put MySQL table into session variable and using the table on next page?, I would like to explain what I'm trying to do here. I have a website that contains a form, through which users can answer questions. At the end of the form, the goal is to advice users about which product is best for them. This advice is achieved by asking users several different questions. Depending on what answers they give, a list of products in a MySQL table will be assigned points.

Modifying MySQL table on different pages with scores from a HTML form

眉间皱痕 提交于 2019-12-25 06:42:06
问题 In regard to this question How to put MySQL table into session variable and using the table on next page?, I would like to explain what I'm trying to do here. I have a website that contains a form, through which users can answer questions. At the end of the form, the goal is to advice users about which product is best for them. This advice is achieved by asking users several different questions. Depending on what answers they give, a list of products in a MySQL table will be assigned points.

Fill a session variable from windows app using web browser control

白昼怎懂夜的黑 提交于 2019-12-25 06:34:57
问题 I have a windows application that contains a web browser, after the user login using the windows app, he is redirected to a website using a web browser control. My question is, can I send a session variable to this website? 回答1: You can't do that directly, since Session variables live on your application server which is completely disconnected from your windows application. What you could do is call a simple URL which sets the variable. Example: http://www.mywebsites/session.aspx?additem=test

Display item list in shopping cart using PHP

孤街醉人 提交于 2019-12-25 06:06:13
问题 With the foreach loop I'm trying to connect to my database and display in a list the products that have been added to the cart. Each product has a product ID which is correctly working and being stored in the session variable through the cart.php. I can't figure out how to connect to the database to display the information gathered about the product added - I also tried doing var_dump $SESSION['cart'] and its prints out null even after I use the "Add" button in cart.php . <div class="row">

Unable to call access session variable

你离开我真会死。 提交于 2019-12-25 05:32:30
问题 I have a flash app which captures image thorugh webcam and stores it in a file throught save.php (below). Now the problem I have is that I am unable to access my session variables when save.php is loaded. Is there a different method I need to use when calling session variables? <?php include 'session.php'; sec_session_start(); $userid=$_SESSION['user_id']; $w = 300; $h = 400; $img = imagecreatetruecolor($w, $h); imagefill($img, 0, 0, 0xFFFFFF); $rows = 0; $cols = 0; for($rows = 0; $rows < $h;

Unable to call access session variable

本秂侑毒 提交于 2019-12-25 05:31:02
问题 I have a flash app which captures image thorugh webcam and stores it in a file throught save.php (below). Now the problem I have is that I am unable to access my session variables when save.php is loaded. Is there a different method I need to use when calling session variables? <?php include 'session.php'; sec_session_start(); $userid=$_SESSION['user_id']; $w = 300; $h = 400; $img = imagecreatetruecolor($w, $h); imagefill($img, 0, 0, 0xFFFFFF); $rows = 0; $cols = 0; for($rows = 0; $rows < $h;

How can I store Session information in a hybrid (Database + Memory) way?

纵然是瞬间 提交于 2019-12-25 03:50:45
问题 Memory is good for speed, but is limited, and therefore requires session time limits which then discard the session information permanently. Database is good for volume storage and catering for more users concurrently and having longer session times. But the increased latency per request is a significant overhead. How can I configure ASP.Net to use an SQL Database (or other database for that matter), and cache the most recent used Session data in memory? It would seem there is no inbuilt

java- how to initialise session in second servlet (to get data stored by first servlet in session variable)

梦想与她 提交于 2019-12-25 03:28:25
问题 I am storing a variable in session data, from a servlet where the user tries logging in to my application. Now I want to retrieve the user data from session, in another servlet in the same application. How do I initialise the session variable in the second servlet? Taking "request" as the "HttpServletRequest" do I code the session variable as "HttpSession session = null;" or as "HttpSession session = request.getSession(true);"? Or is it some other way? Note that in the application flow, the

Check if PHP session has already started

微笑、不失礼 提交于 2019-12-25 02:56:22
问题 I have a PHP file that is sometimes called from a page that has started a session and sometimes from a page that doesn't have session started. Therefore when I have session_start() on this script I sometimes get the error message for "session already started". For that I've put these lines: if(!isset($_COOKIE["PHPSESSID"])) { session_start(); } but this time I got this warning message: Notice: Undefined variable: _SESSION Is there a better way to check if session has already started? If I use

How to put MySQL table into session variable and using the table on next page?

ぐ巨炮叔叔 提交于 2019-12-25 01:09:27
问题 I have two PHP pages. On page1 a temporary table is created and filled with data from a mysql database. I am trying to store this table into a $_SESSION variable so that I can put the table onto page2. Right now this has been my approach: This is (part) of the code on page1: ob_start(); session_start(); //Select data from temporary table $result = mysqli_query($mysqli,"SELECT * FROM table"); //store table into session variable $_SESSION['fase1result'] = $result; This is the code on page2: ob