# HG changeset patch # User paulo # Date 1577092383 28800 # Node ID 3afe26a1d00018d1bc486e9dbe9abd66ae05d9d0 # Parent 4043aaa41075b9d82a6622d3b2bc5db4c0520846 thule_fit_fits: use non-deprecated mysqli module diff -r 4043aaa41075 -r 3afe26a1d000 thule_fit_kits/index.php --- a/thule_fit_kits/index.php Thu Mar 07 00:52:02 2019 -0800 +++ b/thule_fit_kits/index.php Mon Dec 23 01:13:03 2019 -0800 @@ -35,18 +35,14 @@ include('../../login.php'); $database = 'pauloang_fitkits'; - $link = mysql_connect('localhost', $username, $password); - if (!$link) - die('Could not connect to MySQL server: ' . mysql_error()); - - $db_selected = mysql_select_db($database, $link); - if (!$db_selected) - die('Could not select database: ' . mysql_error()); + $mysqli = mysqli_connect('localhost', $username, $password, $database); + if (mysqli_connect_errno()) + die('Could not connect to MySQL server/database: ' . mysqli_connect_error()); $query = 'SELECT * FROM Thule ORDER BY kit_id'; - $results = mysql_query($query); + $results = mysqli_query($mysqli, $query); - while ($row = mysql_fetch_assoc($results)) { + while ($row = mysqli_fetch_assoc($results)) { echo '