Thanks a bunch...mjax
one more question :
When I add a table "shop" into your code and it returns a error message
"mysql_fetch_array(): supplied argument is not a valid MySQL result resource". Why?
Please see the codes below:
<?php
include("connectdb.php");
$shop=mysql_query("select * from Shop, District, City where Shop.ShopDistrict=District.DistrictID, ShopCity=CityID");
while ($result=mysql_fetch_array($shop))
{
echo $result["ShopName"]."<br>";
echo $result["Cityname"].:<br>";
echo $result["Districtname"]."<br>";
echo $result["ShopAddress"]."<br>";
echo $result["ShopTel"]."<br>";
}
?>