2012-05-14 24 views
-4

可能重複:
It is possible to insert data in two different table in mysql by one insert query php?在php中獲取cookies?

我保存在cookie的一些用戶信息,用戶的信息都是這樣的,

FNAME:穆罕默德,LNAME:里亞茲,標題:Developer,org:MagicLamp,電子郵件:[email protected]

I w ant將這些信息插入到mysql數據庫中,問題是這樣我怎麼才能從cookie中獲取這些信息並插入到數據庫中

+3

「它不工作」是什麼意思?您的預期結果與實際結果是什麼?而且,你的代碼充斥着SQL漏洞。 –

+2

您應該明確使用mysql_real_escape_string – mowwwalker

+0

這是您第六次問這個問題嗎?第二個用戶帳戶? – Quentin

回答

0

看起來你只是創建一個cookie,「user_token」,它包含序列化信息你要。我想你想讓你的foreach遍歷非序列化的「user_token」cookie而不是所有的cookie。