Professional Web Applications Themes

[PHP] "back" works in opera but not in internet explorer - PHP Development

anders thoresson <mailto:listorthoresson.net> on Tuesday, August 19, 2003 10:51 AM said: > Is this an internal IE-issue, or could I make my php-script > IE-friendly? Does it work when you refresh the page?...

  1. #1

    Default RE: [PHP] "back" works in opera but not in internet explorer

    anders thoresson <mailto:listorthoresson.net>
    on Tuesday, August 19, 2003 10:51 AM said:
    > Is this an internal IE-issue, or could I make my php-script
    > IE-friendly?
    Does it work when you refresh the page?
    Chris W. Parker Guest

  2. #2

    Default Re: [PHP] "back" works in opera but not in internet explorer

    > Is this an internal IE-issue, or could I make my php-script IE-friendly?

    There are lots and lots of things that IE does differently then the
    rest of the world. Of course, that is because as probably the biggest
    monopoly they feel no problems with breaking standards -- at least the
    standards they don't make.

    This particular issue is, however, not really a standards issue. When
    a form is posted or somehting happens to automatically generate a page,
    some browsers like Mozilla/Netscape will ask you if you want to reload
    the page with the same info or just view the cached version. IE just
    doesn't show it.

    I usually get around this with a "go back" button on the web page that
    submits to the previous web page with all the data. Something of a pain
    to code though.

    -Dan

    Dan Anderson Guest

  3. #3

    Default RE: [PHP] "back" works in opera but not in internet explorer

    >
    > When I push the back buttom in Opera, I get back to the previous
    > (database/php-generated) page in my site, but when I'm using IE and
    push
    > back, I get a message saying that the page isn't valid any more.
    >
    > Is this an internal IE-issue, or could I make my php-script
    IE-friendly?

    [Cesar Aracena]

    This is just a security measure placed there by MS people. It should
    work after refreshing the page. If you don't want that to appear EVER,
    then you shouldn't place any session handling, cookies, $_POST and/or
    $_GET into your PHP code... maybe go back to .htm?

    HTH

    Cesar


    Cesar Aracena Guest

  4. #4

    Default Re: [PHP] "back" works in opera but not in internet explorer

    --- anders thoresson <listorthoresson.net> wrote:
    > When I push the back buttom in Opera, I get back to the previous
    > (database/php-generated) page in my site, but when I'm using IE
    > and push back, I get a message saying that the page isn't valid
    > any more.
    >
    > Is this an internal IE-issue, or could I make my php-script
    > IE-friendly?
    I answered a similar question on a NYPHP mailing list recently, and you can
    read my response here:

    [url]http://lists.nyphp.org/pipermail/talk/2003-August/004757.html[/url]

    Hope that helps.

    Chris

    =====
    Become a better Web developer with the HTTP Developer's Handbook
    [url]http://httphandbook.org/[/url]
    Chris Shiflett Guest

  5. #5

    Default Re: [PHP] "back" works in opera but not in internet explorer

    > Does it work when you refresh the page?

    No. A reload in Internet Explorer kicks me out of my web application. Does
    a reload within IE reset session variables?

    Reloading a page in the application using Opera works.

    --
    anders thoresson
    Anders Thoresson Guest

  6. #6

    Default RE: [PHP] "back" works in opera but not in internet explorer

    anders thoresson <mailto:listorthoresson.net>
    on Tuesday, August 19, 2003 11:46 AM said:
    >> Does it work when you refresh the page?
    >
    > No. A reload in Internet Explorer kicks me out of my web
    > application. Does a reload within IE reset session variables?
    No, realoading will (should) not reset the session.

    But to clarify, are you getting a little dialog box that asks you to
    resubmit the data or cancel? OR is it an actual error page from IE?


    c.
    Chris W. Parker Guest

  7. #7

    Default Re: [PHP] "back" works in opera but not in internet explorer

    look where it says "Microsoft Internet Explorer Sessions Fix" at:
    [url]http://www.phpfreaks.com/tutorials/41/1.php[/url]

    regards,

    Juan
    Juan Nin Guest

  8. #8

    Default Re: [PHP] "back" works in opera but not in internet explorer

    > But to clarify, are you getting a little dialog box that asks you to
    > resubmit the data or cancel? OR is it an actual error page from IE?
    I get an error page from IE saying that the page isn't valid any more (I
    think that's what IE would tell me if I was using an english version
    anyway. I'm using the swedish one, so it's just a rough translation).

    What I'm trying to do is not returning to a form to resend it, but rather
    step backwards through my menu system. My menu is built by multiple forms,
    all having to following syntax:

    <form method="post" action="article_view_issue.php">
    <select name="show_article_issue" OnChange = form.submit()>
    <option>Visa nummer
    <?php
    db_connect($dbuser, $dbpassword, $dbdatabase);
    $query = "SELECT i_date FROM un_issue WHERE i_date > CURDATE()";
    $result = mysql_query($query);
    while ($row = mysql_fetch_row($result))
    {
    ?>
    <option value="<?php echo $row[0]; ?>"><?php echo $row[0] . "\n"; ?>
    <?php
    }
    ?>
    </select>
    </form>

    I'm also starting every page in the system with a call to my function
    accesscontrol() that checks if certain session variables, like username and
    password, are set. If, they are validated, if not, the login page are
    shown.

    Pressing reload causes the login page to show up, and that's why my guess
    is that the session variables for some reason are reseted.

    Accesscontrol() is 134 lines of code, and I don't know which parts might be
    of interest here. At log in, username and password are stored to two
    session variables:

    $_SESSION['uname'] = $_POST['uname'];
    $_SESSION['pwd'] = $_POST['pwd'];

    Everytime accesscontrol() is called, I make three if-checks:

    if(isset($_SESSION['uname'])) {
    Validate already logged in users.
    }
    elseif(isset($_POST['uname']))
    {
    Login-form just filled in. Validate.
    }
    else
    {
    If neither $_POST['uname'] nor $_SESSION['uname'] is set, here I display
    the login form
    }

    And since reloads brings up the login form, $_SESSION['uname'] is not set
    anymore, for some reason.

    //Anders




    --
    anders thoresson
    Anders Thoresson Guest

  9. #9

    Default one out of four session variables lost

    > $_SESSION['uname'] = $_POST['uname'];
    > $_SESSION['pwd'] = $_POST['pwd'];
    When the user first logs in I also adds two more session variables within
    accesscontrol():

    $_SESSION['editor'] = mysql_result($result,0,"u_editor");
    $_SESSION['admin'] = mysql_result($result,0,"u_admin");

    Both is either an Y or a N. When showing menus, I use these two session
    variables to decide wether editor and admin menus should be shown to the
    present user. Like this:

    include ("schedule.php");
    if ($_SESSION['editor'] == "Y")
    include ("editor.php");
    if ($_SESSION['admin'] == "Y")
    include ("admin.php");

    But something strange happens. Sometime, while an user who is both admin
    and editor is logged in, the $_SESSION['editor'] variable is dropped,
    causing the editor menu not being shown.
    A check through all my source code shows that the only instance where I
    assign is in accesscontrol() shown above.

    Are there any known cirstances where session variables are lost?

    (I guess that the answer is no, and this is an error caused by myself, but
    since I can't find it, I have to ask ;)

    --
    anders thoresson
    Anders Thoresson Guest

  10. #10

    Default Re: [PHP] "back" works in opera but not in internet explorer

    To fix this, I put:

    session_cache_limiter ('private, must-revalidate');

    at the beginning of all my pages. Seems to work.

    -eric wood


    anders thoresson wrote:
    > When I push the back buttom in Opera, I get back to the previous
    > (database/php-generated) page in my site, but when I'm using IE and
    > push back, I get a message saying that the page isn't valid any more.
    >
    > Is this an internal IE-issue, or could I make my php-script
    > IE-friendly?
    >
    > --
    > anders thoresson
    Eric Wood Guest

Similar Threads

  1. Internet Explorer "Could Not Find Adobe Acrobat". Why?
    By George_McKim@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 4
    Last Post: May 16th, 04:09 AM
  2. "Connection closed by remote server" error in Opera
    By BGS in forum ASP.NET General
    Replies: 0
    Last Post: July 24th, 07:40 PM
  3. Help! "Get" works, "Post" doesn't (ASP VB)
    By stewboy webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 1
    Last Post: July 17th, 02:11 PM
  4. Replies: 2
    Last Post: July 2nd, 12:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139