Welcome to WebmasterWorld Guest from 54.167.22.37

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

function on page close

php function on page close

     

layer8

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

10+ Year Member




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!

mcibor

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

WebmasterWorld Senior Member 10+ Year Member



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

layer8

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

10+ Year Member



Thanks - you are a *
 

Featured Threads

Hot Threads This Week

Hot Threads This Month