Can someone please help with the echo statement, I’ve tried to escape out but cant get it to work. need to generate the following line for every recordset returned.
L.marker([35.00,-86.00]).bindLabel(‘Unit:1001’).addTo(map).showLabel(true).bindPopup(‘Active’);
Here is the code.
[php]<?php
date_default_timezone_set(‘America/Chicago’);
// Connects to your Database
mysql_connect(“localhost”, “x”, “x”) or die(mysql_error());
mysql_select_db(“gps”) or die(mysql_error());
$data = mysql_query(“SELECT lat, lng,id,callsign FROM x”)
or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
echo "L.marker([$lat,$lng]).bindLabel(‘Unit:$callsign’).addTo(map).showLabel(true).bindPopup(‘Active’);
}
?>[/php]
This is not for a commercial project its for the local storm spotters / responders.