How to Use JavaScript code in PHP code
<p>I want to know the present location of the user in my application.For that i have to use the </p>

<p>Geolocation code in my PHP code.But i don't know how to use JavaScript code in the PHP code.</p>

<p>The JavaScript code for Geolocation is as follows.</p>

<pre><code>      function displayLocation(loc){
      var lat = loc.coords.latitude;
      var lon = loc.coords.longitude;
      }
      function getLocation(){
      navigator.geolocation.getCurrentPosition(displayLocation);
      }
    $(document).ready(function(){
    getLocation();
    });
</code></pre>

<p>i want to assign these lat and lon values to my php variables Latitude and longitude.</p>

<p>For that i have to know how to use the JavaScript code in php and how to assign JavaScript
values to php variables.</p>

<p>Let me know if any suggestions to complete this task.</p>

<pre><code>              Thanks.......
</code></pre>
