homepage Welcome to WebmasterWorld Guest from 54.204.141.129
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
function on page close
php function on page close
layer8




msg:1301952
 6:19 pm on Jan 23, 2005 (gmt 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!

 

mcibor




msg:1301953
 8:22 pm on Jan 23, 2005 (gmt 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

layer8




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

Thanks - you are a *

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved