我想創建一個簡單的PHP代碼,當用戶點擊一個體育場的鏈接時,它會顯示使用谷歌地圖的體育場的位置。但是,當我嘗試點擊體育場時,它沒有顯示確切的位置。我已經多次檢查過代碼,我不知道問題出在哪裏。谷歌地圖不顯示正確的位置
這是地圖的代碼
<html>
<?php
session_start();
include('dbconn.php');
$id=$_GET['id'];
$sql=mysql_query("SELECT stadium, city, state FROM fixtures where fixtures_id='" .$id ."'");
$row= mysql_fetch_array($sql);
$stadium = urlencode($row['stadium']);
$city = urlencode($row['city']);
$state = urlencode($row['state']);
$place = "$city,+$stadium,+$state";
?>
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0"
marginwidth="0" src="https://maps.google.com/maps?
f=q&source=s_q&hl=en&geocode=&q=<?php echo $place; ?>
&aq=0&ie=UTF8&hq=&hnear=<?php echo $place; ?>
&t=m&iwloc=&output=embed"></iframe>
</html>
這是我如何存儲體育館,城市和國家我的數據庫裏面
這是這是不正確的輸出
謝謝!它現在有效 –