If user login attempt fails, I wanna write something under the login form like I do in Asp.NET (lblResult.Text = "Login Failed")
Here is the Login for example:
<body>
<form method="post">
Username: <input type="text" name="username"/><br />
Password: <input type="password" name="password"/><br/>
<input type="submit" id="Submit" value="Submit"/>
</form>
</body>
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.
Thanks.
Add something like this where you want the message:
Note, I’m using the alternative control structure syntax, which is slightly nicer than curly braces when writing spaghetti.