Why that header("Refresh:0"); does not work when ajax is running
HTML
<form class="login" method="post" action="login.php"> Телефон <input type="text" name="phone" /> Пароль <input type="password" name="password" /> <button type="submit" name="submit">Войти</button> </form> Js
$(document).ready(function(){ $('.login button').click(function(e){ e.preventDefault(); $.ajax({ type: 'POST', url: 'login.php', data: $('.login').serialize(), success: function(data) { notice() $('notice').html('<div class="notice">'+data+'</div>'); } }); }); });
location.reload()to help you. - Alex Krass