Login   Register  
PHP Classes
elePHPant
Icontem

File: add_session.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Carlos Falo Hervás  >  basic_basket  >  add_session.php  >  Download  
File: add_session.php
Role: Application script
Content type: text/plain
Description: adding new client sessions
Class: basic_basket
Basic Shopping basket system
Author: By
Last change:
Date: 13 years ago
Size: 476 bytes
 

Contents

Class file image Download
<?PHP
  $sql 
"SELECT * FROM tbl_active_sessions WHERE sessionID = '" $sessionID "'" ;
  
$rs = new mysql_recordset("conn",$sql) ;
  if (
$rs->query()==0)
    {
    
// No Session with same ID was found so we add a new session
    
$segs time() ; 
    
$sql "INSERT INTO tbl_active_sessions (sessionid,start) VALUES ('" $sessionID "'," $segs ")" ;
    
$comm = new mysql_command("conn",$sql) ;
    
$comm->execute() ;
    } 
  
$rs->clear_recordset() ;
?>