The quick question is, is it safe to use the jQuery.post function in jQuery to pass user login information into a PHP script? I am thinking about using a piece of code, for example:
$("#login_form").submit(function() {
var unameval = $("#username").val();
var pwordval = $("#password").val();
$.post("backend.php", { username: unameval, password: pwordval },
function(data) {
$("#status p").html(data);
});
return false;
});
I'm just wondering how safe this is, like creating a standard login form that asks for a new page when submitted.
source
share