title: PHP get phone number using intl-tel-input
body: <p>I can't GET or POST the data from intl-tel-input form that sent. Does anyone know how to solve this?</p>
  
  <p>I'm using intl-tel-input at <a href="https://github.com/jackocnr/intl-tel-input" rel="nofollow">https://github.com/jackocnr/intl-tel-input</a> to get visitors country and phone code.</p>
  
  <p>Follow are my form</p>
  
  <pre><code>&lt;form action="&lt;?php echo "http://" . $_SERVER["HTTP_HOST"]; ?&gt;/send.php"  method="post" enctype="multipart/form-data" id="rsv"&gt;
                  &lt;table width="100%" align="center" border="0" cellpadding="5" cellspacing="5"&gt;
                      &lt;tbody&gt;                             
                          &lt;tr&gt;
                              &lt;td&gt;Country:&lt;/td&gt;
                              &lt;td&gt;
                                  &lt;select name="listcountry" id="listcountry"&gt;&lt;/select&gt;
                                  &lt;input type="hidden" name="country" name="country" /&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td&gt;Guest phone No.:&lt;/td&gt;
                              &lt;td&gt;
                                  &lt;?php /* &lt;input type="tel" name="phone" value="62361761688" size="40"&gt; */ ?&gt;
                                  &lt;input type="tel" name="phone" id="phone" placeholder=""&gt;
                                  &lt;input type="hidden" name="phonefull" id="phonefull" /&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2" valign="middle"&gt;
                                  &lt;div class="myhr" style="border-bottom: 1px solid #E2E2E2;"&gt;&lt;/div&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2" valign="middle"&gt;
                                  Questions and special requests:&lt;br&gt;&lt;br&gt;&lt;p&gt;&lt;/p&gt;
                                  &lt;p&gt;
                                      &lt;textarea name="message" cols="40" rows="10"&gt;&lt;/textarea&gt;
                                  &lt;/p&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2" align="left"&gt;
                                  &lt;input type="submit" name="book" value="Book Now"&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/tbody&gt;
                  &lt;/table&gt;
              &lt;/form&gt;
  </code></pre>
  
  <p>below are the send.php</p>
  
  <pre><code>if(!empty($_POST["book"] &amp;&amp; isset($_POST["book"]))){
  echo $_POST['listcountry'];
  echo $_POST['country'];
  echo $_POST['phone'];
  echo $_POST['phonefull'];
  </code></pre>
  
  <p>}</p>
  
  <p>Below are the javascript:</p>
  
  <pre><code>$("#phone").intlTelInput({
      autoHideDialCode: true,
      autoPlaceholder: true,
      separateDialCode: true,
      nationalMode: true,
      geoIpLookup: function (callback) {
          $.get("http://ipinfo.io", function () {}, "jsonp").always(function (resp) {
              var countryCode = (resp &amp;&amp; resp.country) ? resp.country : "";
              callback(countryCode);
          });
      },
      initialCountry: "auto",
  });
  
  // get the country data from the plugin
  var countryData = $.fn.intlTelInput.getCountryData(),
    telInput = $("#phone"),
    addressDropdown = $("#listcountry");
  
  // init plugin
  telInput.intlTelInput({
    utilsScript: "../wp-content/themes/saba/build/js/utils.js" // just for formatting/placeholders etc
  });
  
  // populate the country dropdown
  $.each(countryData, function(i, country) {
    addressDropdown.append($("&lt;option&gt;&lt;/option&gt;").attr("value", country.iso2).text(country.name));
  });
  
  // listen to the telephone input for changes
  telInput.on("countrychange", function() {
    var countryCode = telInput.intlTelInput("getSelectedCountryData").iso2;
    addressDropdown.val(countryCode);
  });
  
  // trigger a fake "change" event now, to trigger an initial sync
  telInput.trigger("countrychange");
  
  // listen to the address dropdown for changes
  addressDropdown.change(function() {
    var countryCode = $(this).val();
    telInput.intlTelInput("setCountry", countryCode);
  });
  </code></pre>
  
  <p>Please assist me guys</p>
  
  <p>Thank in advance.</p>