File: add_session

Recommend this page to a friend!
  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: 15 years ago
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() ;
?>


For more information send a message to info at phpclasses dot org.