Hi everyone
My problem is that when the condition is true it will close the window but not execute the php part !
here goes my code..
<script type="text/javascript">  
function onClose()  
{  
var r=confirm("Is the meeting Over!");  
if (r==true)
 {  
<?php $result=mysql_query($sql);?>  
window.close();  
 }  
else  
 {  
<?php $result2=mysql_query($sql2);?>    
 }  
}  
</script>  
this is the php part..
$sql="UPDATE previousmeetings SET Live='0' WHERE MeetingID='34'"; //$meeting_id  
$sql2="UPDATE previousmeetings SET Live='1' WHERE MeetingID='34'";