SEE TABLE 表显示最终输出。所以我希望用户能够单击BlockName字段并单击BlockName上的数据应该发送到另一个页面。 < /第> - > 标题 声母 姓 电话 电子邮件 办公室 块名称 部门 照片 “;
$index = 0;
$querynum ="SELECT csi315_dir_staff.title,csi315_dir_staff.initials,csi315_dir_staff.surname,csi315_dir_staff.phone,csi315_dir_staff.BlockName,csi315_dir_staff.email,csi315_dir_staff.office,csi315_dir_departments.department_name, csi315_dir_staff.photo FROM csi315_dir_staff, csi315_dir_departments WHERE csi315_dir_staff.department_id=csi315_dir_departments.department_id AND $search_query";
$resultnum = mysqli_query($db_link,$querynum);
$num_members = mysqli_num_rows($resultnum);
// echo "search for $search_name :" ;
echo " $num_members staff found. ";
while ($row = mysqli_fetch_assoc($result)){
$image="";
if(file_exists("profile_pics/".$row['photo']))
{
$image="profile_pics/".$row['photo'];
}
else{
$image="profile_pics/default.jpg";
}
echo "<tr echo $index++ % 2 ? ' class='even'' : ''>",
"<td>{$row['title']} </td>",
"<td>{$row['initials']}</td>",
"<td>{$row['surname']}</td>",
"<td>{$row['phone']}</td>",
"<td>{$row['email']}</td>",
"<td>{$row['office']}</td>",
"<td>{$row['department_name']}</td>",
"<td><a href =\"/phonebook/withDropdownList_version2/home.html?id={$row['BlockName']}\"/><img src=\"images/build.png\" width=25px\" height=\"25px\"/></a> </td>",
"</tr>";
}
echo "</tbody>
</table>";
// render the pagination links
$pagination->render();`
答案 0 :(得分:0)
您可以将数据作为查询参数发送。