I cant seem to get the code in red to work in mysqli can anyone help please
i still need to change some to mysli but thats the line i have the problem with?

Code:
<?php include('styles/top.php'); ?>


    
     <div id="full">
    
        <div id="view_box">
            <ul>
                <li><img src="images/1.png" /></li>
                <!-- <li><img src="pics/2.jpg" /></li> -->
                <!-- <li><img src="pics/3.jpg" /></li> -->
            </ul>
        </div>
        
        <div id="button">
            <ul>
                <!-- <li><button class="button" scroll_value="0">*</button></li> -- >
                <!-- <li><button class="button" scroll_value="600">*</button></li> -->
                <!-- <li><button class="button" scroll_value="1200">*</button></li> -->
            </ul>
        </div>
        <hr /><br />
        
       <?php
        
        if (($user_level !=1) && ($user_level !=2)){
            echo "No Access Allowed";
        } else {
        
        $per_page = 8;
        $pages_query = mysqli_query($link,"SELECT COUNT(`id`) FROM(`orders`) WHERE OrderBy = '$username'");
        $pages = ceil(mysqli_result($pages_query,0)/$per_page);
        
        if (!isset($_GET['page']))
        {
            echo "<meta http-equiv='refresh' content='0;url=view.php?page=1'>";
        }
        else
        {
            $page = $_GET['page'];
        }
        
        $start = (($page - 1)*$per_page);
        
        
        ?>
        
        <h3>View Orders</h3>
        
        		<table border=1">
				<tr>
					<th>FULL NAME </th>
                    <th>DATE GOT </th>
					<th>PAY DATE</th>
					<th>MONEY DUE</th>
                    <th>UPDATE ORDER STATUS</th>
				</tr>
                
                <tr>
						<td>&nbsp;</td>
						<td></td>
						<td></td>
                        <td></td>
                        <td></td>
					</tr>
                
                <?php
                
                error_reporting(0);
                $result = mysqli_query($link,"SELECT * FROM orders WHERE OrderBy = '$username' AND Status = 'Layon' LIMIT $start,$per_page");
            
                
                $totmoney = 0;
                $strmoney = "";
                
                while ($myrow = mysqli_fetch_array($result))
                {
                    $strmoney = $myrow["Money"];
                    $strmoney = str_replace(',','',$strmoney);
                    
                    if(is_numeric($strmoney))
                    {
                        settype($strmoney, "float");
                        $strmoney = number_format($strmoney, 2);
                    }
                    echo "<TR><TD><a href=\"_view.php?id=".$myrow['id']."\">".$myrow["FullName"]."</A>&nbsp;</TD><TD>".$myrow["GotDate"]."&nbsp;</TD><TD>".$myrow["PayDate"]."&nbsp;</TD><TD>&pound;".$strmoney."&nbsp;</TD>";
    				echo "<TD><center><a href=\"update_order.php?id=".$myrow['id']."\"><img class=\"displayed\" alt=\"View\" src=\"images/edit.png\" width=\"175\" height=\"25\" /></a></center></TD>";
                    echo "</TR>";
                    
                    $totmoney = $totmoney + (int)$myrow["Money"];
                }
                
                
                ?>
                
                
                   <tr>
						<td>&nbsp;</td>
						<td></td>
						<td></td>
                        <td></td>
                        <td></td>
					</tr>
                
                <tr>
						<td>&nbsp;</td>
						<td>TOTAL DUE</td>
						<td>&pound;<?=number_format($totmoney, 2);?>&nbsp;</td>
                        <td></td>
                        <td></td>
					</tr>
              			
			</table>
            
            
            <br />  
       
       <?php
       echo "<center>";
       for ($number=1;$number<=$pages;$number++)
        {
            echo '<a href="?page='.$number.'">'.$number.'</a> | ';
        }
            echo "<br/><br/><font color='white'>Current Page: $page</font>";
       echo "</center></br>";
       
       ?>
               
        <?php
        }
        ?>
        
        
       
    </div>

<?php include('styles/bottom.php'); ?>