Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require '../dbconn.php';
- $n=1;
- $sqlst = $con->prepare('SELECT * FROM TABLE WHERE ETC');
- $sqlst->execute();
- $num = $sqlst->rowCount();
- if ($num){
- echo '<div class="table-responsive">';
- echo '<table class="table table-striped" border="1">';
- /* Table Header*/
- echo '<tr><th></th><th></th><th></th><th></th><th></th>';
- while($row = $sqlst->fetch(PDO::FETCH_ASSOC)){
- //Data to fetch from db
- echo '<tr id="row'.$row['id'].'"><td>'.$n.'</td>';
- //echo '<td><a class="btn btn-primary" role="button" href="page.php?id='.$row[''].'"><i class="fa fa-check"></i></a></td></tr>';
- $n++;
- }
- echo '</table>';
- echo '</div>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement