<div class="error"><?php 
echo Error::displayError();
?>
</div>
                                <form action="" method="POST" enctype="multipart/form-data">
                                    <table class="table table-striped table-bordered bootstrap-datatable datatable responsive" >
                                        <tr>
                                            <td><label class="control-label" for="selectError">Category </label></td>
                                            <td>
                                                <div class="input-group" style="width: 50%">
                                                    <span class="input-group-addon"></span>
                                                    <select required="" name="category_id" class="form-control">
                                                        <option value="">--Select Category--</option>
                                                        <?php 
$pagecategoryObj = new PageCategory();
$rows = $pagecategoryObj->getAll();
foreach ($rows as $row) {
    $selected = "";
    if ($row['id'] == $category_id) {
        $selected = 'selected="selected"';
    }
    ?>
                                                            <option value="<?php 
    echo $row['id'];
    ?>
" <?php 
    echo $selected;
    ?>
><?php 
    echo $row['name'];
    ?>
                        Add 
                    </a><br/><br/>
                    <table class="table table-striped table-bordered bootstrap-datatable datatable responsive">
                        <thead>
                            <tr>
                                <th>Id</th>
                                <th>Name </th>
                                <th>URL</th>
                                <th>Status</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php 
$pageObj = new PageCategory();
$rows = $pageObj->getAll();
foreach ($rows as $row) {
    ?>
 
                                <tr>
                                    <td><?php 
    echo $row['id'];
    ?>
</td>
                                    <td class="center"><?php 
    echo $row['name'];
    ?>
</td>
                                    <td class="center"><?php 
    echo $row['url'];
    ?>