Issues (4542)

config/koneksi.php (3 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');
0 ignored issues
show
Deprecated Code introduced by
The function mysql_connect() has been deprecated: 5.5 Open a connection to a MySQL Server ( Ignorable by Annotation )

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

7
/** @scrutinizer ignore-deprecated */ mysql_connect($server, $username, $password) or die('Koneksi gagal');

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
8
mysql_select_db($database) or die('Database tidak bisa dibuka');
0 ignored issues
show
Deprecated Code introduced by
The function mysql_select_db() has been deprecated: 5.5 Select a MySQL database ( Ignorable by Annotation )

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

8
/** @scrutinizer ignore-deprecated */ mysql_select_db($database) or die('Database tidak bisa dibuka');

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
9
10
if (! function_exists('user_log')) {
11
    function user_log($log)
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
Deprecated Code introduced by
The function mysql_query() has been deprecated: 5.5 Send a MySQL query ( Ignorable by Annotation )

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

18
        $sql = /** @scrutinizer ignore-deprecated */ mysql_query($query);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
19
    }   
20
}