0

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");
       }
});
Mr Neo
  • 1,449
  • 3
  • 22
  • 39
CJAY
  • 6,435
  • 17
  • 58
  • 100

0 Answers0