Back button and session variables

2012-01-15  Source: Original Site  Category:PHP  Views:0 

Advertisement

I have a series of pages that use session variables. Every time the first page in the series is loaded, the session variables are destroyed using the following code:

<?
session_start();
session_unset();
session_destroy();

Recently I learned that 2 users are having trouble with the site. One is using IE6 with XP. The other is using IE6 with Windows 98. When they click the browser's Back button and return to the first page in the series, the first page is apparently never reloaded and the variables are not destroyed.

I've tested the site using PCs with 98, and XP that had IE6 and have not been able to duplicate the problem. Each time I click the Back button, the session is destroyed and the pages work fine.

Any ideas?

Related articles
  • Back button and session variables 2012-01-15

    I have a series of pages that use session variables. Every time the first page in the series is loaded, the session variables are destroyed using the following code: <? session_start(); session_unset(); session_destroy(); Recently I learned that 2

  • back button and session problem 2012-03-25

    i'm having a problem with an application i'm developing. i use sessions to control access through my pages once a user has logged in. eventually, the user hits a link which takes him to the 'log out page'. here comes the problem: once the user loads

  • Back button and Session vars 2013-02-10

    Hello I have a Session controled frame. I submit the page and after I press back and the variable appears in a text box correctly, after I change the value of the text box and resubmit the page, but the variable is not changed... I tried to unset, de

  • Form and session variables not passing correctly 2013-02-13

    I'm having a problem getting both my form variables and session variables to pass to the next page. In fact they will not pass at all. I've done some searching on my problem, and can't seem to come up with anything. the first page, cgitest.php, is a

  • Passing variables and session variables 2013-04-14

    I'm currently working on a shopping cart script that works just fine with register_globals turned on but when turned off i get all kind of errors. The following page displays a detail of the book with the "Add to cart" link at the bottom. books.php

  • Script for using the Back button and the Close button 2012-11-20

    Here's a question I have for anyone that might be able to help me: I can write a html script that will allow the user to return to the previous page using the back button, and I can write a script that will allow the user to return to the previous pa

  • Sessions and session variables 2013-05-16

    the php manual's treatment on sessions and session variables is miserably techish (http://www.php.net/manual/en/ref.session.php) and I wish there were some other more educational resources I could read that were more like a tutorial. for years I've t

  • jQuery Trapping the forward and back buttons and other navigation events 2013-09-05

    I'm trying to trap navigation off of a web page so that the user is presented with a warning dialog before allowing the departure event to continue. Specifically, I need to trap the forward button, the back button, and clicking on a link, but I don't

  • Back button and variables 2014-06-09

    Please can someone have a look at http://coleshillbiz.co.uk/add.php for me. If you fill in the form and click on the preview button and then click back you will see that all of the form data is lost. I think it has something to do with the way I hand

  • Back button and submittion 2014-07-14

    I'm working on the submittion page. User fill's out the info clicks the submit button and all the info is stored in to sql database. All the info is transfered trough form fields. The problem is if the user then goes to some other page and click back

  • PHP and SESSION variables cause server to die 2014-10-09

    I don't know if there is something unstable about using $_SESSION variables or not, but I've written user management scripts for my website, most of the time everything works okay but sometimes my server goes off on it's own and I can't load any page

  • Queries and Session Variables 2012-10-04

    Can session variables be used in a query somehow? I my users to be able to click on a link, and from there the query would search the database for the value stored in the variable, (their username, for example), and then display those results. I don'

  • HTTP_REFERER and session variables 2013-11-13

    I've got two PHP pages. (After the code I explain the problem) FIRST PAGE ========= <?php echo $_SESSION['ifz']; ?> <form name="form1" method="post" action="second_page.php"> <fieldset> <p><label>IFZ:</label> <i

  • forms and Session variables 2014-04-22

    Ok, now i am trying to make different forms in different pages like in this example: first page ----- form 1 ----- form 2 ----- form 3 ----- view all results So in the first page you will be able to select from among three forms in any order you wan,

  • Table and Session Variable 2014-11-15

    I have a website for .net 2.0. I have a table named tblVariables. It should start out with 1 row of cells: "Name", "Variable", "Action(s)". That's not a problem. The problem is: I have a button that when pressed should add a TableRow to my table. Obv

  • Ajax and session variables 2014-11-20

    I have an application which allows the user to switch between 8 different form pages without losing their data. When the user has filled in some information they click a link which calls an ajax function to update the information in the database. It

  • htaccess and session variables - combined 2015-02-27

    I am hoping that there is an easy way to do this... I'd like to have be able to write to an .htaccess file and verify that a page and/or directory listed there has passed my login, where I set PHP session variables. For example, if I have 50 pages on

  • multipage forms and session variables 2015-03-19

    i'm using session variables to store data input in forms spanning several pages. but i noticed that once a value is assigned to a session variable, it maintains that value throughout the session - even if the user goes back and edits the form input,

  • Few questions re. Foreign Keys and Session Variable syntax 2012-04-25

    I'm currently trying to write my own registration/login procedure for a website, using PHP and MySQL. I understand the basics of PHP, but I'm using Dreamweaver to write the bulk of the code for me, editting it only where I need to. Here is what I hav

  • Query resources and session variables 2012-06-01

    Can anybody tell me why it does not seem to be possible to store the result returned by mysql_query in a session variable and then reuse it? Suppose that I declare $dbResult to be a session variable, and then, on the first entry to the page I initial