我有以下代码,但我找不到为什么不回显 $rslt[0]["product_id"]; ? cookie在浏览器中,谁能告诉我什么问题?
if (isset($_COOKIE["jshopping_temp_cart"])) {
mysql_connect("localhost", "user", "pass") or die(mysql_error());
mysql_select_db("shopping_katalog") or die(mysql_error());
$result = mysql_query("SELECT * FROM x9qg6_jshopping_cart_temp WHERE id_cookie ='".$_COOKIE["jshopping_temp_cart"]."'");
while ($row = mysql_fetch_array($result)) {
$data = $row['cart'];
$rslt = unserialize($data);
echo $rslt[0]["product_id"];
}
}