Test if Login Failed in PHP
<p>If user login attempt fails, I wanna write something under the login form like I do in Asp.NET <code>(lblResult.Text = "Login Failed")</code></p>

<p>Here is the Login for example:</p>

<pre><code>&lt;body&gt;
        &lt;form  method="post"&gt;
            Username: &lt;input type="text" name="username"/&gt;&lt;br /&gt;
            Password: &lt;input type="password" name="password"/&gt;&lt;br/&gt;
            &lt;input type="submit" id="Submit" value="Submit"/&gt;
        &lt;/form&gt;
    &lt;/body&gt;
</code></pre>

<p>And if login fails, right under the form, "Login failed" kind of message should be shown but I don't know any other way besides adding the whole form code with echo or something.</p>

<p>Thanks.</p>
