php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15978 Losing fields values after opening a new window
Submitted: 2002-03-09 19:43 UTC Modified: 2002-11-16 17:38 UTC
From: crikou at xsilence dot net Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.0.6 OS: WIN 2K
Private report: No CVE-ID: None
 [2002-03-09 19:43 UTC] crikou at xsilence dot net
Really strange...I believe it is a session problem (session_cache_limiter)

Here is the thing:
I'm using PHP4 sessions, and so have set the session_cache_limiter to 'private, must revalidate', to keep history.
I have a page A.PHP with form. This page calls B.php. After sending datas from a.php to b.php and then hit the back button (to go back to a.PHP), I found my formfields with values always here. OK. Everything works fine.

But when I send datas from a.php to b.php ,and then, on b.php page, I open a new window (with <A TARGET="_blank", or _new, or JS window.open, or right-click open in a new window), and try to go back to a.php again, then my fields are empty!!!!

Hu!
You can try on www.php.net, the problem is there too!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-10 06:36 UTC] sander@php.net
This behaviour depends on your browser, not on PHP.
 [2002-11-16 17:34 UTC] christos dot e at cytanet dot com dot cy
I have exactly the same problem.

I am using the phakt 1.3 extension to build a PHP site with UltraDev (www.interakt.ro). My site restricts access to users according to their access level.

I have a menu in my main page which has links to several other pages. When a user clicks on a link, a new window opens (target="_blank") with the linked page.

The 'Restrict Access to Page' server behavior sometimes (almost half of the times I tried it) denies access to a logged in, legitimate user, while other times it works fine.

I did a little experiment: while having the page open, I modified the code and removed the target="_blank" from the link. I refreshed the page, and clicked it. And it worked. The linked page opened correctly - but not in a new window of course.

Apparently the problem appears whenever a new browser window opens. 

If the problem is browser-related, is there any way do you know of any way it can be solved?

Thnx
 [2002-11-16 17:38 UTC] nicos@php.net
As Sander said, this has nothing to do with PHP really, PHP is server-side and can't deal with that. That depend only of your browser and I don't think this can be fixed excepted if you use cookies, assuming your browser is allowing them. Anyway sessions should be kept if you don't close your first browser page to open the second one, if it doesn't you've just forgot to add session_start() in the second page.

Thanks for your report.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 13 20:01:34 2024 UTC