0
HTMLコンテンツは別々のファイルにあります。それらのファイルをphpファイルに含めました。ここでデータは表形式で表示されますが、体系的には表示されませんか?
問題は、データがそれぞれの見出しの下に来ていない、すなわち、 社員、EmployeeName、MOBILENUMBERは見出し「MOBILENUMBER」の下に来ているということです。
ヘッダーファイル:
<div class="row" style="height:370px; width:850px; overflow:scroll;">
<table border ='1' align = "center" id="FormTable" class="table" >
<tr>
<th> Employee Code
<th> Employee Name
<th> Mobile Number
<tr>
<td>
<td>
<td>
フッターファイル:
</th>
</th>
</th>
</tr>
</td>
</td>
</td>
</tr>
</table>
</div>
メインファイル:
public function showEmployeeProfile() {
if (!isset($_SESSION["email"]) || !isset($_SESSION["passwrd"])) {
header("Location:index.php");
// Cannot Access this page without Login.
}
if (empty($_POST)) {
if (isset($_SESSION['email'])) {
echo '<h3>' . "Welcome   '{$_SESSION['email']}'" . '</h3>';
// Prints Email ID of the HR Manager.
}
echo '<h4>'.'<center>'."Profile Info of the Employees".'</center>'.'</h4>'.'<br/>';
$read_sql = "select * from employeeprofile";
$result_fetch = mysqli_query($this->connection, $read_sql);
include ("Header.php");
while ($resultArr = $result_fetch->fetch_array()) {
echo $resultArr['EmployeeId'] . '<br/>';
echo $resultArr['EmployeeName'] . '<br/>';
echo $resultArr['MobileNumber'] . '<br/>' . '<hr/>';
}
include ("Footer.php");
}
}
私は変更がヘッダーとフッターファイルで行われる必要があると思う。
あなたは要素でテーブルの行にデータをエコーされていません!だから、テーブルに正しく表示されません – RiggsFolly