我真的需要一些帮助。我正在尝试建立一个网站并从 mysql 数据库中提取内容。我要填充的 div 如下。我遇到的问题是如何将 php 代码合并到 div 中?
<div class="cardetails">
<img src="img/carpic.jpg"/>
<p class="make"><a href="car.html">'model of car'<a></p>
<p class="price">£Price</p>
<div class="clear"></div>
</div>
$db = mysql_connect("localhost", "root", "Password1")
or die ("Couldn't connect to Server!");
$result = mysql_select_db("my_cars", $db)
or die ("Couldn't select Database!");
$query = "select img, make, price, from tbl_automatic WHERE MakeID = '7'";
$result = mysql_query($query,$db)
or die ("Couldn't execute query!");
提前谢谢大家