user1393109 user1393109 - 11 months ago 97
SQL Question

Insert cookies data into MySQL database in PHP?

Possible Duplicate:

How to get offline cookies data with php and insert it in mysql?

Get cookies in php?

I have some users information saved in cookie, the users information are like this,


I want to insert these information in to MySQL database. The problem is this: how can I get this information from a cookie and insert into database?

$str = "";

foreach ($_COOKIE as $key => $value)
    $str .= $key . ":" . $value . ",";

$str = substr($str, 0, -1);