1 2 3 4 5 6 7 8 9
| $sql_history = "INSERT INTO `phplist_user_user_history` (`id`, `userid`, `ip`, `date`, `summary`, `detail`, `systeminfo`) VALUES (NULL, :userid, :ip, 'NOW()', 'Import_by_script', 'subscription', 'HTTP_USER_AGENT = :useragent REMOTE_ADDR = :ip2')";
$stm2 = $db->prepare($sql_history);
$stm2->bindParam(':userid', $userid);
$ip = get_client_ip();
$stm2->bindParam(':ip', $ip);
$stm2->bindParam(':useragent', $_SERVER['HTTP_USER_AGENT']);
$stm2->bindParam(':ip2', $ip);
$res = $stm2->execute(); |
Partager