This question has been posted before, and I've tried following several different methods to try to get this working, but it won't. On login I need to post to a php form. If that PHP form succeeds, it changes the header location to redirect the user into the site. But Chrome will not prompt to save the users login information.
I've read about how Chrome seems to look for an input[type=password][name=password], input[type=text][name=username]. And I've tried using an input[type=submit] and button with button.submit() attached to it. But neither work.
Code looks something like this:
<form id='loginForm' name='loginForm' action='/scripts/login.php' method='post'>
<input type='text' name='username' id='username' placeholder='Username' maxlength='30' autofocus required><br/>
<input type='password' name='password' id='password' placeholder='Password' maxlength='64' required><br/>
<button type='button' name='login' id='loginButton'>Login</button>
</form>
<script>
$('#loginButton').click(function(){
$('#loginForm').submit();
});
</script>
Then login.php does the authentication needed and changes the header location:
header('Location: /pages/index.php');
Throughout I never get Chrome asking to save my user credentials. Any thoughts? Thanks.
I've tried the following already: