<?php
$result = mysqli_query($con1, "SELECT * FROM bank ORDER BY id DESC;");
if(mysqli_num_rows($result) > 0){
while($row = mysqli_fetch_array($result)){
$a1 = $row['a1'];
$a2 = $row['a2'];
$a3 = $row['a3'];
$a4 = $row['a4'];
}}
if ($a4 == "" or $a3 == ""){
$taschart_1 = "-86.721524, 96.332683" ;
}else{
$chart = $a4 . "," . $a3 ;
}
?>
var roadeye = L.icon({iconUrl: 'assets/img/ta.png',iconSize: [30, 30],popupAnchor: [0,-15]});
var customPopup = "<br>data : <?php echo"$a1"?><br/><br>time : <?php echo"$a2"?><br/>";
var customOptions =
{'maxWidth': '130','className' : 'custom'}
L.marker([<?php echo"$chart"?>], {icon: roadeye}).bindPopup(customPopup,customOptions).addTo(map);
--------------------------------------------------------
hi, please help me.
database data to leaflet.
This is my code. But it only brings one point.