0
それは以下のコードをスタンドとして、私は、誰かがどこ誤りを指摘でしたそれは現在Php Mysql呼び出しが他のhtml要素の後にレンダリングされていますか?
div
render title
div
render footer
/div
render footer
/div
だはず
div
render title
render table
/div
div
render footer
/div
、大学のプロジェクトを終えて、私のHTMLは正しくレンダリングの問題を抱えていますありますか?
<body>
<div class="content main">
<h2>Status Posting System</h2>
<?php
require_once ("settings.php");
$search = $_GET["search"];
$conn = @mysqli_connect($host, $user, $pswd)
or die('Failed to connect to server');
@mysqli_select_db($conn, $dbnm)
or die('Database unavailable');
$query = "SELECT * FROM status WHERE status like '%" . $search . "%'";
$results = mysqli_query($conn, $query);
echo "<table width='100%' border ='1'>";
echo "<tr><th>Status Code</th><th>Status</th><th>Share</th><th>Permission</th>
<th>Date</th></tr>";
while($row = mysqli_fetch_assoc($results)) {
echo "<tr><td> {$row['code']}</td>";
echo "<td> {$row['status']}</td>";
echo "<td> {$row['share']}</td>";
echo "<td> {$row['permission']}</td>";
echo "<td> {$row['date']}</td>";
echo "</tr>";
}
mysqli_free_result($results);
mysqli_close($conn);
?>
</div>
<div class="padding-footer"><a class="footer" href="index.php">Return Home</a></div>
</body>
</html>
私はあなたの質問を編集しましたが、私はそれを考えていますが、まだ明確ではありません - コードが現在何を意味しているのか少し分かりますか? –