خرید بک لینک

Vote count: 0

This is the modal of a specific customer information i'm trying to make

I'm having problems showing all the results in my modal. There are three rows I want to display in the modal: Billing months for June 2016, May 2016, and April 2016, but only the latest(June 2016) will show. Here's the part of my code:

if(isset($_GET['id'])) 
                        {

                            $page_id = $_GET['id'];  

                            $select_query = "SELECT * FROM billing_info INNER JOIN customer_login ON billing_info.account_no=customer_login.account_no WHERE billing_info.account_no='$page_id' ";

                            $run_query = mysqli_query($co,$select_query);

                            while($row = mysqli_fetch_array($run_query)) 
                            {
                                $id = $row['user_id'];
                                $cust_fname = $row['cust_fname'];
                                $cust_mname = $row['cust_mname'];
                                $cust_lname = $row['cust_lname'];
                                $branch = $row['branch'];
                                $account_no = $row['account_no'];
                                $billing_month = $row['billing_month'];
                                $pres_reading = $row['pres_reading'];
                                $prev_reading = $row['prev_reading'];
                                $payment_status = $row['payment_status'];
                                $due_date = $row['due_date'];
                                $int_pres = intval($row["pres_reading"]);
                                $int_prev = intval($row["prev_reading"]); 
                                $difference = $int_pres-$int_prev;
                                $payment = $difference*26.678;

                                $cust_fname = ucfirst($cust_fname);
                                $cust_mname = ucfirst($cust_mname);
                                $cust_lname = ucfirst($cust_lname);
                                $branch = ucfirst($branch);

                    ?>

    <div id="openModal" class="modalDialog" style="width:100%;">
    <div id="form-sms" style="height: 500px; overflow: scroll;">
    <div class="close"><a href="admin-customers.php"> X</a></div>

    <form method="get" action="customer_view.php?id=<?php echo $id; ?>" name="id" enctype="multipart/form-data">

<table width="100%" bgcolor="white" align="center">
    <style type="text/css">


    td.hundred{
        width: 80%;
        text-align: center;
    }
    input {
        width: 100%;
    }
    input[type="text"]{
        width: 90%;
        text-align: left;
    }
    input[type="submit"]{
        width: 100%;
        text-align: center;
    }
    textarea{
        width: 90%;
        text-align: left;
        margin-left: 10%;
    }
    td {
        padding: 10px;
    }
    .tdhover:hover {

        color: #AFEEEE;
    }
    </style>


                <tr >
                    <td align="center"  colspan="10"><h1><?php echo $cust_fname." ".$cust_mname." ".$cust_lname." - ".$account_no." - ".$branch." Details" ?></h1></td>
                </tr>

                <tr bgcolor="#20B2AA">

                    <th>Billing Month</th>
                    <th>Present Reading</th>
                    <th>Previous Reading</th>
                    <th>Payment</th>
                    <th>Status</th>
                    <th>Due Date</th>
                    <th>Water Usage (in m<sup>3</sup>)</th>
                    <th>Edit</th>
                </tr>
                <tr bgcolor="#AFEEEE">


                    <td><?php echo $billing_month; ?></td>
                    <td><?php echo $pres_reading; ?></td>
                    <td><?php echo $prev_reading; ?></td>
                    <td><?php echo "Php " . $payment; ?></td>
                    <td><?php echo $payment_status; ?></td>
                    <td><?php echo $due_date; ?></td>
                    <td><?php echo $difference; ?></td>  


                    <td><a href="billing_edit_posts.php?edit=<?php echo $id; ?>">Edit</a></td> 
                </tr>

                <tr style="margin-top: 10px;">
                    <td bgcolor="#20B2AA" align="center" class="tdhover" colspan="10"><a href="billing_add.php" style="text-decoration:none; color: white; ">Add Billing Information</a></td>
                </tr>



</table>
</form>
</style>
</table>
</form>
</div>
</div>


                <?php } }?>

asked 58 secs ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 10 تير 1395 ساعت: 10:15

صفحه بندی