联系
<?php
$host = "localhost";
$user = "root";
$password = "";
mysql_connect($host, $user, $password);
mysql_select_db("admin");
SESSION_START();
if($_SESSION["loggedin"]!="true")
header("location:login.php");
$id = $_REQUEST["Emp_ID"];
$test = mysql_query("select * from Employee inner join department where Emp_ID =$id");
$row = mysql_fetch_assoc($test);
?>
详细信息表
<table align="left" border="0" width="700px" cellpadding="0" cellspacing="5px">
<tr>
<th>Name :</th>
<td><?php echo $row["Emp_Fname"];?></td>
</tr>
<tr>
<th>Handphone :</th>
<td><?php echo $row["ContactNo_HP"];?></td>
</tr>
<tr>
<th>Telephone :</th>
<td><?php echo $row["ContactNo_Home"];?></td>
</tr>
<tr>
<th>Address :</th>
<td><?php echo $row["Emp_Address"];?></td>
</tr>
<tr>
<th>Email :</th>
<td><?php echo $row["Emp_Email"];?></td>
</tr>
<tr>
<th>Department :</th>
<td><?php echo $row["Dept_Desp"];?></td>
</tr>
</table>
我的 Dept_Desp 是表“部门”内的数据
只显示部门名称的第一个数据,不能显示真实的