|
 |
|
Fatal error: Call to undefined function inarray() คืออะไรครับ |
|
 |
|
|
 |
 |
|
[font=Verdana]Fatal error: Call to undefined function inarray()[/font]
คือว่าผมทำระบบซื้อขาย เมื่อก่อนมันก่อใช้ได้
ตั้งแต่ทำระบบ login เพิ่มเข้ามา มันขึ้น eror เลยครับ แต่ถ้า logout มันก่อซื้อขายได้ อ่ะครับ โทดทีนะครับ มือใหม่เลยไม่รู้ว่าต้องแก้ไงครับ
Code (PHP)
<?PHP
session_start();
$product_id=$_GET[id];
if (count($sess_id)=="0") {
$check=1;
} else if (!inarray($product_id , $sess_id)){
$check=1;
}
if ($chaek=1) {
include('webadmin/connect.php');
$sql="SELECT
cart_product.product_id,
cart_product.cart_id,
cart_product.product_code,
cart_product.product_name,
cart_product.description,
cart_product.photo,
cart_product.type,
cart_product.price_send,
cart_product.price,
cart_product.date_post
FROM
cart_product where product_id='$product_id'";
$query=mysql_query($sql);
$rs=mysql_fetch_array($query);
$sess_product_id[]=$rs[product_id];
$sess_cart_id[]=$rs[cart_id];
$sess_product_code[]=$rs[product_code];
$sess_product_name[]=$rs[product_name];
$sess_price[]=$rs[price];
$sess_num[]=1;
//session_register();
$_SESSION['sess_product_id']=$sess_product_id;
$_SESSION['sess_cart_id']=$sess_cart_id;
$_SESSION['sess_product_code']=$sess_product_code;
$_SESSION['sess_product_name']=$sess_product_name;
$_SESSION['sess_price']=$sess_price;
$_SESSION['sess_num']=$sess_num;
}
header("Location: basket.php");
?>
นี่หน้าที่มัน EROR ช่วยหน่อยครับ อธิบายหน่อยด้วยก็ได้ครับ ขอบคุณครับ
Tag : PHP, MySQL

|
|
 |
 |
 |
 |
Date :
2010-10-08 16:06:22 |
By :
siamspeeds |
View :
2855 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มันไม่รู้จัก function inarray() ครับ
http://php.net/manual/en/function.in-array.php
น่าจะเขียนแบบนี้
in_array()
|
 |
 |
 |
 |
Date :
2010-10-08 16:38:02 |
By :
- - |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 05
|