function display_error_block() {
    if (!empty($_SESSION['error_msg'])) {
        echo '
            <div>
                <script type="text/javascript">
                    $(function() {
                        $( "#dialog:ui-dialog" ).dialog( "destroy" );
                        $( "#dialog-message" ).dialog({
                            modal: true,
                            buttons: {
                                Ok: function() {
                                    $( this ).dialog( "close" );
                                }
                            }
                        });
                    });
                </script>
                <div id="dialog-message" title="">
                    <p>'. htmlentities($_SESSION['error_msg']) .'</p>
                </div>
            </div>'."\n";
        unset($_SESSION['error_msg']);
    }
}
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.