I want to store an array of textbox values in cookie or local storage so next time when user logs in he can see his old values
include('connect.php');
$id = $_GET['ex_id'];
$query = "SELECT * FROM workout_exercise WHERE plan_id = $id";
$res = mysqli_query($con,$query);
$ic = 0;
while($row = mysqli_fetch_array($res))
{
?>
<input type="text" name="weight[<?php echo $ic++; ?>]"
id="weight[<?php echo $ic++; ?>]"
placeholder="enter weight">
......
Above is the PHP code used to generate the array of textboxes.