An example
Greetings,
here is some example code of how I used this...
<?php if(isset($_GET['failed']) && $_GET['failed'] == "1") { ?>
<h2 class="center" style="color: #red; margin-top: 20px;"><span style="font-weight: bold;"><em>Your Login Was Unsuccessful - Please Try Again</em></span><em>!</em><br />
or contact your <a href="mailto:youremail@yourdomain.com?subject=Client%20Name%20Admin%20Forgot%20Password%20Request">Super Admin</a> to recover your password.</h2>
<?php } ?>
I put this just below the form on the login page and made sure the form action was as follows.
action="users_login.php?failed=1<?php echo(isset($_SERVER["QUERY_STRING"])?"&".($_SERVER["QUERY_STRING"]):""); ?>"
I hope this helps!
Martin