<?php
    /*-----
        function: complain_and_exit
        purpose: expects a string saying what should
            have been entered and wasn't, and returns
            nothing, but has the side-effects of
            outputting a complaint screen, destroying
            the current session, and exiting

        requires: 328footer.txt
    -----*/

    function complain_and_exit($missing_info_type)
    {
        ?>
        <h2> Need to enter a 
             <?= strip_tags($missing_info_type) ?>...!
             RUN AWAY!
        </h2>

        <form method="post"
              action="<?= htmlentities($_SERVER['PHP_SELF'],
                                       ENT_QUOTES) ?>">
            <input type="submit" value="try again!" />
        </form>

        <?php
        session_destroy();
        require_once('328footer.txt');
        exit;
    }
?>