<?php
if (isset($_GET['_msg']) &&
    isset($_SERVER['HTTP_REFERER']) &&
    parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST) == $_SERVER['HTTP_HOST']) : ?>

    <div class="am-info am-info-msg-flash" id="am-info-msg" style="clear:both">
        <?php p($_GET['_msg']) ?>
    </div>
<?php endif; ?>