Pantip.com Pantip-TechExchange | Pantip-Cafe | PantipMarket.com | Chat | PanTown.com | BlogGang.com| Torakhong.org| GameRoom
 




ช่วยดูให้หน่อยค่ะ งง ทำไม่เป็นอ่ะ คือมันไม่ออก ตรงค่า session นี่อ่ะ ไม่รู้เขียนผิดหรือเปล่า

ช่วยดูให้หน่อยค่ะ งง ทำไม่เป็นอ่ะ คือมันไม่ออก ตรงค่า session นี่อ่ะ ไม่รู้เขียนผิดหรือเปล่า

ไฟล์ product_add.php

<?php
$product=$_POST['product'];

session_start();
$mcart[$count][0]=$product;

$count++;
header("Location:product.php");
?>


ไฟล์ product.php

<?php
session_start();
if(session_is_registered($_SESSION['count'])==false){
session_register($_SESSION['count']);
session_register($_SESSION['mcart']);

$count=$_SESSION['count'];
$mcart=$_SESSION['mcart'];

$count=0;
}


for($i=0;$i<$count;$i++)
{
echo $mcart[$i][0];
}

?>


จากคุณ : น้ำอ้อย -[ 21 ธ.ค. 50 - 12:58:34 A:124.157.238.37 X: ]




ข้อความหรือรูปภาพที่ปรากฏในกระทู้ที่ท่านเห็นอยู่นี้ เกิดจากการตั้งกระทู้และถูกส่งขึ้นกระดานข่าวโดยอัตโนมัติจากบุคคลทั่วไป ซึ่ง PANTIP.COM มิได้มีส่วนร่วมรู้เห็น ตรวจสอบ หรือพิสูจน์ข้อเท็จจริงใดๆ ทั้งสิ้น หากท่านพบเห็นข้อความ หรือรูปภาพในกระทู้ที่ไม่เหมาะสม กรุณาแจ้งทีมงานทราบ เพื่อดำเนินการต่อไป
Considering the real-time nature of this webboard, it is impossible for us to review all messages/post. Please remember that we do not actively monitor the contents of and are not responsible for any messages posted. Anyone who feels that a posted message is inappropriate, Please encouraged to contact us immediately by email at kratoo@pantip.com , and We will remove objectionable messages within a reasonable time frame.



Pantip-Cafe | Pantip-TechExchange | PantipMarket.com | PanTown.com | BlogGang.com