Get cookies in php? [duplicate]

2019-03-07 07:53发布

问题:

Possible Duplicate:
It is possible to insert data in two different table in mysql by one insert query php?

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

Fname:Muhammad,Lname:Riaz,title:Developer,org:MagicLamp,email:riaz@yaho.com

I want to insert these information in to mysql database , The problem is this how can I get these information from cookie and insert into database

回答1:

It looks like you're only creating one cookie, "user_token", which contains the serialized information you want. I think you want your foreach to iterate over the unserialized "user_token" cookie instead of all the cookies.