мой HTML-код
<form class="form" id="d_personal_form" action="<?php echo base_url('registerdoctor');?>" method="post">
<input type="tel" id="d_phone">
<button class="btn" type="submit" id="d_send_personal_data">send</button>
</form>
код JavaScript
<script>
var input = document.querySelector("#d_phone");
var output = document.querySelector("#d_phone_error_msg");
var iti=intlTelInput(input, {
allowDropdown: true,
initialCountry: "auto",
nationalMode: true,
preferredCountries: ['ye'],
utilsScript: "assets/js/utils.js?"
});
$(document).ready(function(){
$("#d_send_personal_data").click(function(){
$.ajax({
type:'POST',
url:"<?php echo base_url();?>doctor_c/register_doctor",
data:{d_phone:iti.getNumber()},
success: function(data)
{
alert(iti.getNumber());
alert('true data ...');
},
error: function(){
alert('something went wrong...');
}
});
});
});
</script>
мой код контроллера codeigniter
$phone= $this->security->xss_clean($this->input->post('d_phone'));echo $phone;
контроллер не отображает никакого значения, большое спасибо залюбая помощь