This Product Name already exists. Please try another."; } else { $sql="insert into products (user_id,v_id, cat_id, subcat_id,subcat2_id, prod_name, prod_price,offer_price, shipping_charge, prod_descript, prod_status, prod_qty, reorder_lvl, taxable, prod_war_period, prod_war_by, prod_war_details, prod_details, prod_features, prod_specification) values ($uid,".$_REQUEST['vendor'].", ".$_REQUEST['cat'].", ".$_REQUEST['subcat'].",".$_REQUEST['subcat2'].",'".$_REQUEST['prod']."', ".$_REQUEST['price'].",".$_REQUEST['offer_price']. ",".$_REQUEST['shipping'].", '$psum', '".$_REQUEST['stat']."', ".$_REQUEST['qty'].", ".$_REQUEST['reorder'].", ".$_REQUEST['tax'].",'$wp','$wby','$wd','$pd','$pf','$ps')"; mysql_query($sql); //echo "
".$sql."
".mysql_error(); $id=mysql_insert_id(); if(basename($_FILES['image']['name']!="")) { $imageFile1=$id."-".basename($_FILES['image']['name']); $target="../images/products/".$imageFile1; move_uploaded_file($_FILES['image']['tmp_name'],$target); $srcPhoto="../images/products/".$imageFile1; $thumbPhoto="../images/products/thumbnails/".$imageFile1; createthumb($srcPhoto,$thumbPhoto,167,147); $str1=", prod_image='$imageFile1'"; } if(basename($_FILES['image2']['name']!="")) { $imageFile2=$id."-".basename($_FILES['image2']['name']); $target="../images/products/".$imageFile2; move_uploaded_file($_FILES['image2']['tmp_name'],$target); $srcPhoto="../images/products/".$imageFile2; $thumbPhoto="../images/products/thumbnails/".$imageFile2; createthumb($srcPhoto,$thumbPhoto,167,147); $str2=", prod_image2='$imageFile2'"; } if(basename($_FILES['image3']['name']!="")) { $imageFile3=$id."-".basename($_FILES['image3']['name']); $target="../images/products/".$imageFile3; move_uploaded_file($_FILES['image3']['tmp_name'],$target); $srcPhoto="../images/products/".$imageFile3; $thumbPhoto="../images/products/thumbnails/".$imageFile3; createthumb($srcPhoto,$thumbPhoto,167,147); $str3=", prod_image3='$imageFile3'"; } $udate=date("Y-m-d"); $sql="update products set update_date='$udate'".$str1.$str2.$str3." where prod_id=".$id; mysql_query($sql); //echo "
".$sql; gotoPage("manage_product.php"); } } ?>
Add New Product
Vendor : "; echo ""; while($rowVen=mysql_fetch_array($rsVen)) { echo ""; } echo ""; ?>
Category : "; echo ""; while($rowCat=mysql_fetch_array($rsCat)) { echo ""; } echo ""; ?>
Sub Category : "; echo ""; echo ""; ?>
Sub Category2 : "; echo ""; echo ""; ?>
Product Name :
Summary :
Product Price :
Offer Price :
Product Quantity :
Reorder Level :
Shipping Charge :
Image 1 :
Image 2 :
Image 3 :
Taxable :  Yes    No
Warranty Period :
Warranty Provided By :
Warranty Details :
   
Product Details :  
   
Product Features :  
   
Product Specifications :  
Status :  Enable    Disable