0){ remove_product($_REQUEST['pid']); }else if($_REQUEST['command']=='update'){ $max=count($_SESSION['enquiry_basket']); for($i=0;$i<$max;$i++){ $pid=$_SESSION['enquiry_basket'][$i]['productid']; $q=intval($_REQUEST['product'.$pid]); if($q>0 && $q<=999){ $_SESSION['enquiry_basket'][$i]['qty']=$q; } else{ $msg='Some proudcts are not updated!, quantity must be a number between 1 and 999'; } } } $list = ''; if(is_array($_SESSION['enquiry_basket'])){ $j=0; $max=count($_SESSION['enquiry_basket']); for($i=0;$i<$max;$i++){ $j++; $pid=$_SESSION['enquiry_basket'][$i]['productid']; $q=$_SESSION['enquiry_basket'][$i]['qty']; $pname=get_product_name($pid); if($q==0) continue; $sql = "SELECT * FROM `tb_product_list` where id='".$pid."'"; $row_data = $db->getrow($sql); $sql_photo = "SELECT `path`,`upload_date`,`file_name` FROM `tb_product_attachment` WHERE `table_name` = 'tb_product_list' AND `table_id` = '".$row_data['id']."' AND `col_name` LIKE 'photo%' ORDER BY `sorting`"; $row_photo = $db->getrow($sql_photo); // $products_photo = '  dcspares   '; $list .= '
'.$j.'
'.$row_data['name'].'
'.$row_data['model'].'
US$'.$row_data['price_HKD'].'
US$'.$row_data['price_HKD']*$q.'
'; } } $sql = 'select * from tb_member_list where id = "'.$_SESSION['dcspare_id'].'"'; $rowmember = $db->getrow($sql); ?>
Item
Model
Quantity
Unit Price
Sub-total
Please press button if the number of product is updated.

Continuous Shopping Return Products

Registrant Address
First Name
Last Name
Address
City
Country
Postal/Zip Code
Phone No
Company
Comments
Delivery Address?
First Name*
Last Name*
Address*
City*
Country*
Postal/Zip Code*
If you don’t have a Postal/Zip Code with your city, please enter N/A
Phone No*
Company
Comments
I have checked all the items are correct.
Please make the transaction done.
'; $jscode .= 'window.onload=function() {'; $jscode .= 'alert("Invalid input in '.$reason.'");'; $jscode .= '}'; $jscode .= ''; echo $jscode; }else if (isset($_GET['empty'])) { $jscode = ''; $jscode .= ''; echo $jscode; } ?>