i want to use PHP setcookie() and i am having a problem with it. as a matter of fact i want to fetch some rows from data base then first save them in cookies and then retrieve them. consider i have a table in my database with multiple rows and for example 4 column. how can i do this. this is my current code. any idea thank you
<html>
<body>
<?php
error_reporting(0);
include("config.php");
$quer= "SELECT*FROM ".$db_table." ";
$query=mysqli_query($connect,$quer)
or die(mysqli_error());
?>
<?php while($row = mysqli_fetch_array($query)):
setcookie("$cookiename", $row, 2 * 24 * 60 * 60 * 1000);
//i do not know how can i retrieve columns now
?>
<?php endwhile;?>
</body>
</html>
</div>