Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Running code when Session ends

$
0
0

How can you run a query or a piece of code when a session ends or the user exits the browser with out logging out? 

 

Thanks. 

 

 
 
<?php
 
session_start();
include('C:\inetpub\wwwroot\connect.php');
$provider_id = $_SESSION['provider_id'];
$sql2 = "INSERT INTO provider_submits
(provider_sub) values( '$provider_id')";
$result2 = sqlsrv_query($link, $sql2); 
 
 
 exec('c:\\dblocal\\notes.bat'); ?>
 

Viewing all articles
Browse latest Browse all 13200

Trending Articles