# HG changeset patch # User paulo # Date 1577523508 28800 # Node ID 712cc41e0be271608f1a93433813a2d9f3ff00ee # Parent 083e09bb913a185ef4949713b1352ab24fc7a270# Parent 3afe26a1d00018d1bc486e9dbe9abd66ae05d9d0 merge heads diff -r 083e09bb913a -r 712cc41e0be2 thule_fit_kits/index.php --- a/thule_fit_kits/index.php Mon Sep 23 19:55:00 2019 -0600 +++ b/thule_fit_kits/index.php Sat Dec 28 00:58:28 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 '