snowal raj

snowal raj

  • NA
  • 166
  • 39.8k

How to POST value to PHP in the same page using jQuery

Feb 9 2017 6:20 PM
Hai,
I have one label and button. when i click button, i need display button value into label    
in same page without page reload in php
 
I will Try this
 
$(function (){
$(".1234").click(function() {
$(".123").toggle();
var CID = $(this).val();
$.ajax({
type: "POST",
url: "php/test.php",
 
data:{C_ID:CID},
 success: function(data){
 alert(data);
});
});
});
 
in test.php;
$id = $_REQUEST["C_ID"];
 
but i can't get the button value 
 
plz help 
 
 

Answers (3)