I have a form, whose values I am trying to post after serializing to a controller via ajax. Below is the form:  

**Form** 

```
<form method="post" id="frm_reg_student" class="stop-propagation registration-form">
  <input type="hidden" name="register[user_type]" value="2">
  <input type="hidden" name="register[status_id]" value="1">
  <div class="stud_register_error"></div>
  <div class="row">
      <div class="col-xs-6 col-sm-6 col-md-6">
          <div class="form-group">
              <label for="input" class="control-label font-12 font-blue">First Name <span>*</span></label>
              <input type="text" class="form-control" required="required" placeholder="Your First Name" name="register[first_name]">
          </div>
      </div>
      <div class="col-xs-6 col-sm-6 col-md-6">
          <div class="form-group">
              <label for="input" class="control-label font-12 font-blue">Last Name  <span class="req">*</span></label>
              <input type="text" class="form-control" required="required" placeholder="Your Last Name" name="register[last_name]">
          </div>
      </div>
  </div> 
</form>  

```

**js** 

```
$(".js-btn_reg_student").click(function(e){
        e.preventDefault();
        var serialData= $( "#frm_reg_student" ).serialize();
        alert(serialData);
        $.ajax ({
            type: "POST",
            url: '<?=base_url()?>index.php/register/signup/',
            data: serialData,
            success: function(result) {
                alert(result);
                output = JSON.parse(result);
                if(result) {
                    if( 'success' == output.type ) {
                        location.href = output.location;
                    } else {
                        $('.stud_register_error').html(output.message);    
                    }
                }
            }
        });
    });

```

**Controller** 

```
public function signup(){
      if($_SERVER["REQUEST_METHOD"]=="POST"){
      print_r($_POST);
  }
}

```

Here, `$_POST` comes out to be empty, it never goes inside the loop. If you see in the JS, I have included an alert with the serialized data, which even shows me the proper serialized data. I believe it is something wrong with the way I am posting it.
Any help!