The task is to make authorization on jQuery + PHP + SQL.
Javascript:
$(document).ready(function(){ $("#form").submit(function(e){ e.preventDefault(); if($("#loginText").val()!=""&&$("#passwordText").val()!=""){ $.ajax({ url:"login.php", method:"POST", data: $(this).serialize(), success:function(html){toVote(html);} }); } else{ $("#error").html("Не введен логин или пароль"); } }); var toVote=function(html){ if(html=="error"){ $("#error").html("Логин или пароль введен неверно"); $("#loginText").val(""); $("#passwordText").val(""); } else{ window.location = '/project/voting.html'; } }; }); The question is as follows. How to make it so that the voting.html page cannot be accessed by an unregistered user simply by typing the URL address? Ie how to determine the user's login when calling html pages through AJAX?
.htaccess- Yuri