我正在寻找一种在Href中设置LocalStorage的方法。
这是PHP代码:
<table cellspacing="0">
<tr>
<th>ID</th>
<th>Name</th>
<th>View</th>
<th>Edit</th>
</tr>
<?php
$count=1;
$sel_query="Select * from userdetails ORDER BY id desc;";
$result = mysqli_query($con,$sel_query);
while($row = mysqli_fetch_assoc($result)) {
//something has to be done later.
?>
<tr>
<td align="center"><?php echo $count; ?>
<td align="center"><?php echo $row["docname"]; ?>
<td align="center"><a href="view.php?id=<?php echo $row["id"]; ?>">View</a></td>
<td align="center"><a href="edit.php?id=<?php echo $row["id"]; ?>">Edit</a></td>
</tr>
<?php $count++; } ?>
</table>
单击编辑或查看后,我要存储“ $ row [“ id”];“ 到本地存储?我需要在本地存储中使用此文件,因为我正在使用正在寻找localstorage [key]的js库。
如果可能的话,这可能吗?
慕虎7371278
相关分类