0
檢索在我存儲在數據庫中有關屬性的細節瞬間並將其加載到了使用PHP的HTML表,如下圖所示:如何存儲大量的圖像和HTML
<?php $con=mysqli_connect("localhost:8889","root","root","booksmart_properties");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
else{
echo "we connected";
}
if(isset($_POST['submit']))
{
$university = $_POST['university'];
$rent = $_POST['rent']; // i assumed that you name the second Select tag RENT and the Third ROOMTYPE and the last DISTANCE
$roomtype = $_POST['roomtype'];
$distance = $_POST['distance'];
}
// Perform queries
$result=mysqli_query($con,"SELECT * FROM ListedProperties
WHERE PropertyType ='$roomtype' ");
echo "<table border='1'>
<tr>
<th>PropertyType</th>
<th>Description</th>
<th>Rent Price</th>
<th>Location</th>
</tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['PropertyType'] . "</td>";
echo "<td>" . $row['Description'] . "</td>";
echo "<td>" . $row['RentPrice'] . "</td>";
echo "<td>" . $row['Location'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>
但是我不知道如何我可以設置一個圖像服務器來存儲大量圖像,以便我可以爲每個屬性引用一個圖像,並在結果中以特定大小顯示圖像。