I'm updating the existing php5 page to the php 7 version. The code in php 5 page has been working well. I'm trying to make it work before upgrading php5 to php7 in the admin.
------------ partly excerpted ----------
mysqli_select_db($link, $database);
$query = "SELECT * FROM database";
$Result = mysqli_query($byte, $query) or die(mysql_error());
$row = mysql_fetch_assoc($Result);
$totalRows = mysql_num_rows($Result);
---------------------- partly excerpted in the Result page --------------
<?php if ($totalRows > 0 ) { // Show detail ?>
[ html code ..... etc. etc. ]
<?php do { ?>
<li>
<a href="/index.php?id=<?php echo $row['ID']; ?>" <?php if ($_GET["id"] == $row['ID']) { ?>class="active"<?php } ?>><?php echo $row['Title']; ?></a>
</li>
<?php } while ($row = mysql_fetch_assoc($Result)); ?>
[ html code etc.. ]
<?php } // end ?>
------------ Result -----------
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, object given in /di/...../ on line ..
Warning: mysql_num_rows() expects parameter 1 to be resource, object given in /..../....
I've made changes such as from mysql to mysqli, etc. but now it's where I'm stuck at. Your help will be greatly appreciated. Thank you.