aepnat /
simpuskesmas
| 1 | <?php |
||
| 2 | $server = 'localhost'; |
||
| 3 | $username = 'root'; |
||
| 4 | $password = 'root'; |
||
| 5 | $database = 'db_puskesmas'; |
||
| 6 | |||
| 7 | mysql_connect($server, $username, $password) or die('Koneksi gagal'); |
||
| 8 | mysql_select_db($database) or die('Database tidak bisa dibuka'); |
||
| 9 | |||
| 10 | if (! function_exists('user_log')) { |
||
| 11 | function user_log($log) |
||
|
0 ignored issues
–
show
|
|||
| 12 | { |
||
| 13 | $id_user = $_SESSION['userid']; |
||
| 14 | $ip = $_SERVER['REMOTE_ADDR']; |
||
| 15 | $browser = $_SERVER['HTTP_USER_AGENT']; |
||
| 16 | $log = 'Logout dari Aplikasi Puskemas'; |
||
| 17 | $query = "INSERT INTO `user_log` (`id_user`,`ip`,`browser`,`log`) VALUES ('$id_user', '$ip', '$browser', '$log')"; |
||
| 18 | $sql = mysql_query($query); |
||
|
0 ignored issues
–
show
|
|||
| 19 | } |
||
| 20 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.