php - Extra column in HTML table -


may know how come there 1 column @ table between payment id , update payment column not debug? code below. note: not post picture not have enough reputation.

  <td width="52">bookng id</td>          <td width="78">deposit</td>     <td width="149">total_amt_paid</td>     <td width="149">balance</td>     <td width="149">payment status</td>     <td width="57">card type</td>      <td width="62">total price</td>      <td width="94">payment id</td>      <td width="62"></td>     <td width="293">update payment</td>   </tr>   <?php { ?>   <tr>     <th height="45"><?php echo $row_recordsetupdatepayment['booking_id']; ?></th>      <th><?php echo $row_recordsetupdatepayment['deposit']; ?></th>     <th><?php echo $row_recordsetupdatepayment['total_amt_paid']; ?></th>     <th><?php echo $row_recordsetupdatepayment['balance']; ?></th>     <th><?php echo $row_recordsetupdatepayment['payment_status']; ?></th>     <th><?php echo $row_recordsetupdatepayment['card_type']; ?></th>     <th><?php echo $row_recordsetupdatepayment['total_price']; ?></th>     <th><?php echo $row_recordsetupdatepayment['payment_id']; ?></th>    <th><?php if($row_recordsetupdatepayment['payment_status'] == 'fully paid'){                echo "<th><span style='color:grey' href='updatepayment.php?payment_id=".$row_recordsetupdatepayment['payment_id']."'> update</span></th>"; }               if($row_recordsetupdatepayment['payment_status'] == 'partial'){                echo "<th><a href='updatepayment.php?payment_id=".$row_recordsetupdatepayment['payment_id']."'> update</a></th>";               }                ?>              </th> 

i see 2 problems in code:

first, should rid of empty in first row

<tr>     <td width="52">bookng id</td>          <td width="78">deposit</td>     <td width="149">total_amt_paid</td>     <td width="149">balance</td>     <td width="149">payment status</td>     <td width="57">card type</td>     <td width="62">total price</td>     <td width="94">payment id</td>     <td width="293">update payment</td> </tr> 

second, opening <th> tag , checking condition inside , opening new <th> tag inside condition, code should like:

<th><?php echo $row_recordsetupdatepayment['deposit']; ?></th> <th><?php echo $row_recordsetupdatepayment['total_amt_paid']; ?></th> <th><?php echo $row_recordsetupdatepayment['balance']; ?></th> <th><?php echo $row_recordsetupdatepayment['payment_status']; ?></th> <th><?php echo $row_recordsetupdatepayment['card_type']; ?></th> <th><?php echo $row_recordsetupdatepayment['total_price']; ?></th> <th><?php echo $row_recordsetupdatepayment['payment_id']; ?></th> <?php if($row_recordsetupdatepayment['payment_status'] == 'fully paid') {   echo "<th><span style='color:grey' href='updatepayment.php?payment_id=".$row_recordsetupdatepayment['payment_id']."'> update</span></th>"; } else { echo "<th><a href='updatepayment.php?payment_id=".$row_recordsetupdatepayment['payment_id']."'> update</a></th>"; } ?> 

that should it.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -