Пример #1
0
function show_domains()
{
    ?>
        <table border="1">
            <tr>
                <th>Domain</th>
                <th>Edit</th>
                <th>Delete</th>
            </tr>
        <?php 
    foreach (Domain::get_all() as $domain) {
        ?>
                <tr>
                    <td><?php 
        echo $domain->domain;
        ?>
</td>
                    <td>
                        <form method="get" action="#">
                            <input type="hidden" name="id" value="<?php 
        echo $domain->id;
        ?>
">
                            <input type="hidden" name="action" value="edit">
                            <input type="submit" value="Edit">
                        </form>
                    </td>
                    <td>
                        <form method="post" action="#">
                            <input type="hidden" name="id" value="<?php 
        echo $domain->id;
        ?>
">
                            <input type="hidden" name="action" value="delete">
                            <input type="submit" value="Delete">
                        </form>
                    </td>
                </tr>
                <?php 
    }
    ?>
        </table>
        <?php 
}