The result is a blank screen.
php&Javascript code
<?php
$con = mysqli_connect($db_host,$db_user,$db_passwd,$db_name);
if(mysqli_connect_errno($con)){
echo "no database " . mysqli_connect_error();
}
mysqli_set_charset($con, "utf8");
$result = mysqli_query($con, "select * from Market");
$n = 1;
while($row = mysqli_fetch_array($result)){ ?>
var positions = [
{
latlng: new daum.maps.LatLng(
<?= $row['lat']; ?>, <?= $row['lon']; ?>
)
}
<?php $n++;
}
?>
Normal code when latitude and longitude are inserted without using mysql
var positions = [
{
latlng: new daum.maps.LatLng(33.450705, 126.570677)
}
];
The error message is not displayed in the result window and a blank screen is displayed.