When using the get method on an HTML form the submitted data shows up in the URL. This page shows what I mean. I have been trying to get this to work with JQuery and AJAX using the get method but the data is not showing up in the URL for some reason. Does anyone know why? Here is my code:
$(function() {
$('#mylink').click(function () {
$.get("submit.php", { name: 'John' }, function(data) {
// blah blah blah
});
});
});
I want the end of the URL to be appended with ?name=John and be able to access it with the $_GET variable. How can I do this?