I use Leaflet to show map, on onEachFeature function, I have inserted ajax to get variable to pass to PHP, like this
function onEachFeature(feature, layer) {
  layer.bindPopup(feature.properties.IDLo); 
  layer.on("click", function(e)
  {
    var popup = e.target.getPopup();
    var content = popup.getContent();
    $.ajax({
      url: "index.php",
      type: "GET",
      data: "content=" + content,
      success: function(data)
      {
        console.log(content);
      }
    });
  });   
};
And this is PHP code
<body>
        <h2>My Map</h2>
        <div>
            <?php 
            if(isset($_GET['content']))
                {
                    $uid = $_GET['content'];
                }
            else $uid = 0;
            ?>
        </div>
        <div><?php echo $uid;?></div>
        <div id="map"></div>
        <script src="js/new.js"> </script>
    </body>
I always get 0 result in PHP but on console in chrome, it's the content value.
Is there any sugguest? Thanks in advance.
 
     
    