在 php 中获取 cookie? [英] Get cookies in php?

查看:42
本文介绍了在 php 中获取 cookie?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能的重复:
可以通过一个插入查询php在mysql中的两个不同表中插入数据吗?

我在cookie中保存了一些用户信息,用户信息是这样的,

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

我想将这些信息插入到mysql数据库中,问题是如何从cookie中获取这些信息并插入到数据库中

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

推荐答案

看起来您只是在创建一个 cookie,user_token",其中包含您想要的序列化信息.我认为您希望 foreach 遍历未序列化的user_token"cookie 而不是所有 cookie.

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.

这篇关于在 php 中获取 cookie?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆