I need a small help with correcting this login form script (a part of nicely-styled login form):
<script>
$('.input').focusin(function () {
$(this).find('span').animate({ 'opacity': '0' }, 200);
});
$('.input').focusout(function () {
$(this).find('span').animate({ 'opacity': '1' }, 300);
});
$('.login').submit(function () {
$(this).find('.submit i').removeAttr('class').addClass('fa fa-check').css({ 'color': '#fff' });
$('.submit').css({
'background': '#2ecc71',
'border-color': '#2ecc71'
});
$('.feedback').show().animate({
'opacity': '1',
'bottom': '-80px'
}, 400);
$('input').css({ 'border-color': '#2ecc71' });
<?php
if($entered_username != $default_username || $entered_password != $default_password){
echo "return false;";
}?>
});
The PHP echo command at the end is problematic, but I need to keep return false when incorrect data is sent from login form. The biggest problem is, that when I leave the "return false;" permanently in this script, login is not possible, message about bad credentials is shown.
Could you help me, please, how to fix it? Thank you very much for your help.