Login   Register  
PHP Classes
elePHPant
Icontem

File: add_session

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of kostas gougakis  >  Shopping basket with MySQL connection  >  add_session  >  Download  
File: add_session
Role: Auxiliary script
Content type: text/plain
Description: add session for user
Class: Shopping basket with MySQL connection
Shopping basket stored in a MySQL database
Author: By
Last change:
Date: 2004-09-02 06:24
Size: 410 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)
    {
    
$segs time() ; 
    
$sql "INSERT INTO tbl_active_sessions (sessionid,start) VALUES ('" $sessionID "'," $segs ")" ;
    
$comm = new mysql_command("conn",$sql) ;
    
$comm->execute() ;
    } 
  
$rs->clear_recordset() ;
?>