linking a specific field with another html page

This is the first page of my web app. when clicking one of the following sites, it goes to another page.

Pic 1
在这里输入图像描述

As shown in Pic 2, the details of the Persons that belong to the particular site should come automatically for each site. Is there a method to do this without creating different web pages for each site? If so, can anyone tell me the html and php code for the requirement. Thank you.

Pic 2 在这里输入图像描述


Follow my steps

1) Make the Location column as anchor tag with site unique id like this

<a href="second_page.php?site_id=<?php echo $site_id1 ?>" >site A</a>
<a href="second_page.php?site_id=<?php echo $site_id2 ?>" >site B</a>
.
.
.

2) On click on anchor tag it will navigate you second page with site id .there you can fetch the value from database and populate the table.

select .... where site_id=$_GET['site_id'];

Now it is dynamic . you don't need to create new page of each site .


图3

[<html>
<head>
<title>Login</title>
<link rel="stylesheet" type="text/css" href="project.css">
</head>

<body>
<div class="container">
<form id="project" action="" method="POST">

    <h3><center>Project Details</center></h3>

    <fieldset> 
    <ul>

    <li><a href="../attendancesheet/index.php">Site A</a></li>
    <li><a href="">Site B</a></li>
    <li><a href="">Site C</a></li>
    <li><a href="">Site D</a></li>
    <li><a href="">Site E</a></li>
    <li><a href="">Site F</a></li>
    </ul>
    </fieldset>
    </form>
  </div>
</body>

</html>][2]
链接地址: http://www.djcxy.com/p/89056.html

上一篇: 自动为我的webapp添加“www”子域名

下一篇: 将特定字段与另一个html页面链接起来