i am calling a function when body unload which will set guest user status to "0" when user close the browser but it not working ...
it execute php before function is called..
any idea why this is happening ...plz help it's making me crazy
Code: Select all
function hello()
{
<?php
$Gueststatus="update tbl_guestuser set STATUS='0' Where USERNAME='$userG'";
mysql_query($Gueststatus);
$Userstatus="update tbl_signup set loginststus='0' Where MemberUserName='$user'";
mysql_query($Userstatus);
?>
alert('using');
}