title: How to get the value in javascript into php to store in SQL?
body: <pre><code>&lt;script&gt;
  var x = document.getElementById("latitude");
  var y = document.getElementById("longitude");
  function getLocation() 
  {
      if (navigator.geolocation) {
          navigator.geolocation.getCurrentPosition(showPosition);
          } else { 
          x.innerHTML = "Geolocation is not supported by this browser.";
          y.innerHTML = "Geolocation is not supported by this browser.";
          }
  }
  
  function showPosition(position) 
  {
      x.innerHTML = "Latitude: " + position.coords.latitude;
      y.innerHTML = "Longitude: " + position.coords.longitude;
  }
  </code></pre>
  
  <p></p>
  
  <p>I need to store the X and Y value in variable in the data in SQL database and also display inside the php.  </p>