Guest User

Untitled

a guest
Apr 24th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.88 KB | None | 0 0
  1. Sorry, apologies about not pasting the code!
  2.  
  3.     <?php
  4.     $inttotalcredits = 0;
  5.    
  6.     $result = mysql_query("SELECT * FROM site_products JOIN site_trans ON site_products.product_id = site_trans.trans_product");
  7.    
  8.     while($row = mysql_fetch_array($result) or die(mysql_error())) :
  9.     ?>
  10.    
  11.     <tr>
  12.        <td><center><?php echo $row['product_id'] ?></center></td>
  13.        <td><center><?php echo $row['product_name'] ?></center></td>
  14.        <td><center><?php echo $row['product_number'] ?></center></td>
  15.        <td><center><?php echo $row['product_description'] ?></center></td>
  16.        <td><center><?php echo $row['trans_inventory'] ?></center></td>
  17.        <?php
  18.     $inttotalcredits += $row['trans_inventory']; ?>
  19.     </tr>
  20.    
  21.     <?php endwhile ?>
  22.     </table>
  23.     <center><?php echo $inttotalcredits ?></center>
  24.     </p>
  25.    <p><a href="logout.php">Logout</p>
Add Comment
Please, Sign In to add comment