当前带有视图锚的网格视图结构-我想在单击查看锚后查看特定行,数据应显示在弹出窗口中-javascript
下面是我的代码。我已经实现了 PHP Grid View 的功能,删除选项在顶部用查询字符串实现
现在我想要的是,单击视图后,它应该显示包含该特定行的所有详细信息的 javascript 弹出窗口,并关闭选项
没有得到的部分是如何将数据从 php/mysql 传输到 javaScript 并在弹出窗口中显示
if(isset($_GET['id'])){
$id = $_GET['id'];
//$x = 'confirm("Are you sure you want to delete this product")';
//echo $x;
mysql_query("DELETE FROM users WHERE id = '$id'");
//echo "alert('Row Deletion Successful')";
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Table Display</title>
<style>
table, td, th
{
border:1px solid green;
}
th
{
background-color:green;
color:white;
}
</style>
</head>
<body>
<table>
<thead>
<tr>
<?php $result = mysql_query("SELECT id, CONCAT(title, ' ', name) as FullName, email, mobile FROM users") or die(mysql_error());
$row_count = 1;
$row = mysql_fetch_assoc($result);
echo '<td><input type="checkbox" /></td>';
echo "<th> Sr. No </th>";
foreach($row as $col=>$value)
{
echo "<th>";
echo $col;
echo "</th>";
}
?>
<th>EDIT</th>
</tr>
</thead>
<tbody>
<?php
mysql_data_seek($result, 0);
while($row = mysql_fetch_assoc($result)){
echo "<tr>";
echo '<td><input type="checkbox" /></td>';
echo "<td>" . $row_count ."</td>";
foreach($row as $key=>$value)
{
echo "<td>";
echo $row[$key];
echo "</td>";
}
$row_count++;
?>
<td>
<a href="users.php?id=<?php echo $row['id']; ?>" onclick="return confirm('Are you sure you want to delete this product ?')" title="VIEW" class="icon-1 info-tooltip">VIEW | </a>
<a href="users.php?id=<?php echo $row['id']; ?>" onclick="return confirm('Are you sure you want to delete this product ?')" name="delete">DELETE |</a>
<a href="users.php?id=<?php echo $row['id']; ?>" title="EDIT" class="icon-5 strong-text info-tooltip">EDIT </a>
</td>
<?php
echo "</tr>";
}
echo "</table>";
?>
</tbody>
</table>
</body>
</html>`