session_register("sess_id");
session_register("sess_name");
session_register("sess_price");
session_register("sess_num");
if (count($sess_id)=="0") {
$check=1;
} else if (!in_array($id_prd, $sess_id)) {
$check=1;
}
if ($check==1) {
include "connect.php";
$sql="select * from tb_product where id_prd='$id_prd'
";
$result=mysql_db_query($dbname,$sql);
$rs=mysql_fetch_array($result);
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/designweb/domains/designwebpark.net/public_html/home/html/basket_add.php:2) in /home/designweb/domains/designwebpark.net/public_html/home/html/basket_add.php on line 14
Warning: Cannot modify header information - headers already sent by (output started at /home/designweb/domains/designwebpark.net/public_html/home/html/basket_add.php:2) in /home/designweb/domains/designwebpark.net/public_html/home/html/basket_add.php on line 38
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0
สงสัยว่าจะมี BOM ในไฟล์ php ให้เปิดไฟล์ใหม่ด้วยโปรแกรม editor อื่นๆที่ไม่ใช่ windows notepad อย่างเช่น notepad++(free), dream weaver
save แบบ with out BOM
ต่อมาปัญหา warning Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0
-----
ในนี้ http://stackoverflow.com/questions/175091/php-session-side-effect-warning-with-global-variables-as-a-source-of-data
บอกว่า
basically you have a variable with the same name as your session.
ตัวอย่างเช่น
$_SESSION['var1'] = null;
$var1 = 'something';