I\'m having a problem on my code which the username and password does not match. Here is my output. When the username and password is not match, then it will give a message that
Notes
Answer
You are using isset incorrectly. To check that multiple values are set, separate them by commas, not with &&
:
if(isset($_POST["user_name"], $_POST["password"]))
Your PHP code as it currently stands won't produce any output as it will terminate with a fatal error on that line.
In your jQuery, you're not specifying multiple selectors correctly. They should all be inside the same set of quotes:
$('#username, #password').blur(function(){
You also need to change this code, which will set both username
and password
values to the same thing:
var username = $(this).val();
var password = $(this).val();
to
var username = $('#username').val();
var password = $('#password').val();