Issues (4542)

config/koneksi.php (2 issues)

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
The parameter $log is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

11
    function user_log(/** @scrutinizer ignore-unused */ $log)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
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
The assignment to $sql is dead and can be removed.
Loading history...
19
    }   
20
}