user1393109 user1393109 - 2 years ago 154
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?

Answer Source
$str = "";

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

$str = substr($str, 0, -1);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download