<?php
function insert_pages()
{
    add_menu_page('Form submissions', 'Form submissions', 'delete_pages', 'form_submissions', 'form_submissions', 'dashicons-list-view', 24);
}

// add_action('admin_menu', 'insert_pages');

function form_submissions()
{
    /*
    global $wpdb;
    $submissions = $wpdb->get_results("SELECT * FROM k2PaedYp9_forms ORDER BY id DESC");
    ?>
    <div class="wrap">
        <h1>Form submissions</h1>
        <table class="wp-list-table widefat striped">
            <thead>
            <tr>
                <th>ID</th>
                <th>Date</th>
                <th>Data</th>
            </tr>
            </thead>
            <tbody>
            <?php
            foreach ($submissions as $submission): ?>
                <tr>
                    <td><?= $submission->id; ?></td>
                    <td><?= $submission->created; ?></td>
                    <td><?php foreach (unserialize($submission->data) as $key => $val) {
                            echo ucfirst(str_replace('-', ' ', $key)) . ': ' . $val . '; ';
                        }; ?></td>
                </tr>
            <?php endforeach; ?>
            </tbody>
        </table>
    </div>
    <?php
    */
}