-4

I have a table for print TOTAL REPORT and it does have an error. I think the bug comes with this line and here because when i start to input that code it cause to have an error please help!!! Here's my php code

        <?php 
        $con=mysql_connect("localhost","root","")or die(mysql_error());
       $db=mysql_select_db('project')or die(mysql_error());

            $query=mysql_query("SELECT * from reservation  ")or die(mysql_error());
            while($row=mysql_fetch_array($query)){

        ?>

        <tr>
            <td><?php echo $row['firstname']. ' ' .$row['lastname'] ?></td>
            <td><?php echo $row['address'] ?></td>
            <td><?php echo $row['arrival'] ?></td>


            <td><?php echo $row['departure'] ?></td>
            <td><?php echo $row3['qty'] ?></td>

            <td><?php echo 'PHP ' . number_format(floatval($row['payable'])); ?></td>
            <td><?php echo $row['status'] ?></td>
            <td><?php echo $row['confirmation'] ?></td>
        </tr>
        <?php } ?>
    </tbody>
</table>
        <?php
    $result3 = mysql_query("SELECT qty FROM rooinventory") or die(mysql_error());
    while ($rows3 = mysql_fetch_array($result)) {
?>
<?php
    $result = mysql_query("SELECT SUM(payable) FROM reservation") or die(mysql_error());
    while ($rows = mysql_fetch_array($result)) {
?>

<?php }

$result1 = mysql_query("SELECT SUM(payable) FROM reservation") or die(mysql_error());
while ($rows1 = mysql_fetch_array($result1)) {
?>  
<div class="pull-right">
    <div class="span">
        <div class="alert alert-info"><i class="icon-credit-card icon-large"></i>&nbsp;Total Amount: PHP&nbsp;<?php echo number_format(floatval($rows1['SUM(payable)'])); ?></div>
    </div>
</div>
</center>

1 Answers1

1
<?php } 
     } 
 ?>

add this line after your </center> tag

K.Raj.
  • 643
  • 6
  • 22