Skip to content

Instantly share code, notes, and snippets.

@pipethedev
Created December 16, 2019 21:22
Show Gist options
  • Select an option

  • Save pipethedev/eb09c6dad11ccaa03bd7f255fb9ea3d5 to your computer and use it in GitHub Desktop.

Select an option

Save pipethedev/eb09c6dad11ccaa03bd7f255fb9ea3d5 to your computer and use it in GitHub Desktop.
<?PHP
require_once __DIR__ .'/rb.php';
//Using RB ORM
R::setup('mysql:host=localhost;dbname=payment', 'root', '');
$customers = R::getAll("SELECT * FROM transaction ");
?>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Amount</th>
<th scope="col">Currency</th>
<th scope="col">Status</th>
<th scope="col">Product</th>
</tr>
</thead>
<tbody>
<?PHP foreach($customers as $customer): ?>
<tr>
<th scope="row">1</th>
<td><?php echo $customer['name'];?></td>
<td><?php echo $customer['amount'];?><</td>
<td><?php echo $customer['currency'];?><</td>
<td><?php echo $customer['status'];?><</td>
<td><?php echo $customer['product'];?><</td>
</tr>
<?PHP endforeach; ?>
</tbody>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment