Here I am trying to get the query string passed in url using the jquery and pass on it to php function
I have id=61 in url as a query string,I want to get the id value using the jquery.
How can I do this?
review.php?id=61
this is my code
$('#approve').click(function(){
var id = "product Approved"; //here i want to get the id value
alert(id);
jQuery.ajax({
type: "POST",
url: "update.php",
data: 'id='+id,
cache: false,
success: function(response)
{
alert("Record successfully updated");
}
});