I am a looking for a way to set LocalStorage in A Href.
Here is the PHP code:
<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>
On click of edit or view, I want to store "$row["id"];" to local storage? I need this in local storage because I am using js library which is looking for localstorage[key].
Is this possible if so how?