Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class.user.php - where all my public functions are.
- public function getOrderList() {
- if ( ! empty( $_SESSION['userSession'] ) ) {
- $values = array( ":uid" => $_SESSION['userSession'] );
- $stmt = $this->conn->prepare("SELECT * FROM tbl_orderlist WHERE CustomerID = :uid");
- $stmt->execute($values);
- $row = $stmt->fetchAll();
- // Uncomment this to debug
- // echo "<pre>";
- // print_r( $row );
- return $row;
- }
- }
- transactionlog.php
- <div class="container">
- <div class="panel panel-default">
- <!-- Default panel contents -->
- <div class="panel-heading">User Transaction List</div>
- <!-- Table -->
- <table class="table bg-dark">
- <thead>
- <tr>
- <th>Order ID</th>
- <th>Type of Service</th>
- <th>Template Select</th>
- <th>Order Details</th>
- <th>Customer Name</th>
- <th>Customer Address</th>
- <th>Price</th>
- <th>Mode of Payment</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $stmt = $user_home->getOrderList();
- if($stmt->rowCount()>0){
- foreach ( $stmt as $row ){
- ?>
- <th scope="row"><?echo $row->orderID ?></th>
- <td><?echo $row->TypeofService ?></td>
- <td><?echo $row->TemplateSelect ?></td>
- <td><?echo $row->OrderDetails ?></td>
- <td><?echo $row->CustomerName ?></td>
- <td><?echo $row->CustomerAddress ?></td>
- <td><?echo $row->Price ?></td>
- <td><?echo $row->Delivery ?></td>
- <form method="POST" class="userTransdoConfirm">
- <input type="hidden" value="<?echo $row->CustomerName?>" name="id">
- </form>
- </td> </tr>
- <?
- }
- } ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment