0

here is my code. it only retrieve last inputted data.

How can i populate all data in a htnl table.

<html>


<?php
$id =new Register();
        $test=Register::selecthey();
            foreach($test as $t=>$sid){
}
        ?>
<table>
    <thead>
        <tr>
            <th>Document ID</th>
            <th>Personnel ID</th>
            <th>Docs Name</th>
            <th>Docs Num</th>
            <th>Docs Date</th>
            <th>FileName</th>
            <th>Data</th>
        </tr>    
    </thead>
    <tbody>

            <tr>
                <td><?= $sid->gov_docs_id ?></td>
                <td><?= $sid->personnel_id ?></td>
                <td><?= $sid->docs_name ?></td>
                <td><?= $sid->docs_num ?></td>
                <td><?= $sid->docs_date ?></td>
                <td><?= $sid->filename?></td>
                <td><button type="button" onclick="javascript:location.href='/getfile/<?= $sid->gov_docs_id?>'">download</button></td>


                </td>
            </tr>
<?}?>           
    </tbody>
    <tfoot>
        <tr>
            <td></td>
        </tr>
    </tfoot>
</table>

</body>
</html>
2
Contributors
4
Replies
21
Views
3 Years
Discussion Span
Last Post by jaspertan
0

syntax error, unexpected end of file

this is the error i encountered when i removed the curly bracket at line 8

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.