Welcome to WebmasterWorld Guest from 54.225.58.238

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

function on page close

php function on page close

     
6:19 pm on Jan 23, 2005 (gmt 0)

Full Member

10+ Year Member

joined:Aug 7, 2003
posts:201
votes: 0



Hi guys/gals,

How do i setup a timestamp that rights to mysql on website page close?

Can i add a function based on page closure or do i have to add a session time out mechanism?

Thanks in advance!

8:22 pm on Jan 23, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 26, 2003
posts:1133
votes: 0


file i.php


<?PHP
if($_POST["h"] == "close") do the sql query
?>

<script language="JavaScript" type="text/javascript">
<!--
function java_submit()
{
document.a.h.value = "close";
document.a.submit();
}
//--></script>
<body onclose="java_submit();">
<form name="a" method="POST" action="i.php">
<input type="hidden" name="h">
</form></body>

Hope it helps you somehow!
Best regards
Michal Cibor

2:00 am on Jan 24, 2005 (gmt 0)

Full Member

10+ Year Member

joined:Aug 7, 2003
posts:201
votes: 0


Thanks - you are a *