How am I able to get the value out of cookie array when I push a button?
You need to put the id of each item inside form to indicate the item that will be deleted. <?php $all_favorites= unserialize($_COOKIE[‘favorites’]); echo ‘<table>’; foreach($all_favorites as $key => $value) { echo ‘<tr>’; echo ‘Post-ID = ‘ . $value . ‘ ‘; ?> <form method=”POST”> <input type=”hidden” name=”id” value=”<?php echo $value; ?>”> <button type=”submit” class=”btn btn-default” … Read more