Getting radio button value by ajax

后端 未结 4 980
悲&欢浪女
悲&欢浪女 2021-01-05 03:00

I want to get radio button values and send them through AJAX to PHP.

My AJAX is running but is currently inserting a 0 in each row, so it\'s not picking

4条回答
  •  清酒与你
    2021-01-05 03:29

    Try this use serialize function check serialize here

     $("#save_privacy").submit(function(){
      var serialise = $("#save_privacy").serialize();
      $.ajax({
          url:'edit_check.php',
          type:'POST',
          data:serialise,
          beforeSend: function (){
            $(".privacy_info") .html("\"Loading");
          },
          success:function(data){
            $(".privacy_info") .html(data);
          }
      });
     return false;
    });
    

提交回复
热议问题