When I submit my form using $.post(), nothing happens at all. No error messages, no response, no nothing. It was working before, but it stopped working randomly.
This is my form:
<form id="login_form" class="drop-form" method="POST">
<p class="lead">Sign in</p>
<input class="form-control" name="user_email" type="email" placeholder="Email address" />
<input class="form-control" name="user_password" type="password" placeholder="Password" />
<input class="btn btn-sm btn-primary" type="submit" value="Sign in" />
</form>
and this is my jQuery:
$('#login_form').submit(function(e) {
e.preventDefault();
$.post("core/login.php", $(this).serialize(), function(res) {
console.log('sent to core/login');
// handle response
}, 'json');
});
Chrome's browser console doesn't even show the "sent to core/login". What gives? Like I said, it was working before, and randomly it just stopped working.