I am trying to get the value of an input text field, so I can have a SQL query to change its password. For some reason using the default values provided on the JQuery website e.g. name = "John", time = "2pm". I want to send two strings to get changed, but for some reason A) there is no error or B) any idea if it actually makes it to the test file. Any help would be great!
$("#password_change").submit(function(event) {
var $form = "#password_change";
$collar = $form.find("input[name='collar']").val(),
$.post("test.php", {
name: $collar,
time: "2pm"
})
.done(function(data) {
alert("Data Loaded: " + data);
});
});