<?php 
function regLogin($fullname, $action, $session_id, $ip){
global $conn;	
$create_t = $conn->query("create table if not exists log_history (
                             log_id int(11) NOT NULL auto_increment, 
							 fullname varchar(200) NOT NULL default '',   
							 action varchar(200) NOT NULL default '',
							 session_id varchar(200) NOT NULL default '',
							 ip_log text NOT NULL default '',
							 date_log date NOT NULL default '0000-00-00',
							 time_log time NOT NULL default '00:00',
                             stat  varchar(200) NOT NULL default '',
                             PRIMARY KEY(log_id))
						      ENGINE = MyISAM
							  ") or die($conn->error);

$insertval  = $conn->query("insert into log_history (fullname, action, session_id, ip_log, date_log, time_log, stat) values ('$fullname', '$action', '$session_id', '$ip', '". date("Y-m-d"). "', '". date("H:i"). "', 'Pending')") or die($conn->error); 
return true;

}


?>