page running after browser close

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
don1one
Forum Newbie
Posts: 2
Joined: Sat Jan 30, 2010 1:50 pm

page running after browser close

Post by don1one »

Hi,
I've just run into something I've never seen before.

I have a form that allows a customer to accept or deny an agreement. If agree isn't explicitly clicked, I assume it's been rejected.

The problem is if a visitor closes their browser. The page they're on gets run again after they close the browser, even though form submit is never clicked.

I'm assuming it has something to do with $_SESSION, but I've never seen this feature documented anywhere. It happens on all browsers. I'm running Apache 2.2 on a Redhat server, php 5.2, I'm using $_SESSIONs and it's over an ssl link.

Does anyone know more or somewhere I can go for more information?

Thanks
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: page running after browser close

Post by AbraCadaver »

Post the code and it will be easier to spot the problem.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
don1one
Forum Newbie
Posts: 2
Joined: Sat Jan 30, 2010 1:50 pm

Re: page running after browser close

Post by don1one »

I wouldn't know what part to post, and most of it's sensitive.

But it's basically

Open page with form.
exit browser
server page listed in form action runs anyway.
stuartshields
Forum Newbie
Posts: 10
Joined: Sat Jan 30, 2010 8:59 pm
Location: Toowoomba

Re: page running after browser close

Post by stuartshields »

What $_SESSIONs are being called when the window is being opened? Are you declaring the Sessions before the script? After? During? I think that could be your issue.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: page running after browser close

Post by Benjamin »

Sounds like a JavaScript issue.
Post Reply