<?php
include("db_connection.php");
$Mainclass=new DB_Controller();

$g_weight=$_REQUEST['g_weight'];

$diamond_type = $_REQUEST['diamond_type'];
$quality=$_REQUEST['quality'];
$color=$_REQUEST['color'];
$type=$_REQUEST['type'];
$no_diamonds=$_REQUEST['no_diamonds'];
$diamond_value=$_REQUEST['diamond_value'];
$d_carat=$_REQUEST['d_carat'];
//$total_diamond_price = $no_diamonds*$diamond_value*$d_carat;
$total_diamond_price = $diamond_value*$d_carat;
$sol_diamond_type = $_REQUEST['sol_diamond_type'];
$sol_quality=$_REQUEST['sol_quality'];
$sol_color=$_REQUEST['sol_color'];
$sol_type=$_REQUEST['sol_type'];
$sol_no_diamonds=$_REQUEST['sol_no_diamonds'];
$sol_diamond_value=$_REQUEST['sol_diamond_value'];
$s_carat=$_REQUEST['s_carat'];

//$total_sollitaire_price = $sol_no_diamonds*$sol_diamond_value*$s_carat;
$total_sollitaire_price = $sol_diamond_value*$s_carat;
$product_size=$_REQUEST['product_size'];


$temp_id=$_REQUEST['design_id'];
$serial_no=$_REQUEST['serial_no'];
$has_d=$_REQUEST['has_d'];
$has_s=$_REQUEST['has_s'];
$has_size=$_REQUEST['has_size'];

$item_no=$_REQUEST['item_no'];
$total_price=$_REQUEST['total_price'];




$Mainclass->Update_Data("gold_temp_product_master","GoldWeight='".$g_weight."',DiamondQuality='".$quality."',DiamondColor='".$color."',DiamondType='".$type."',No_Diamond='".$no_diamonds."',Diamond_Value='".$diamond_value."',Diamond_Carat='".$d_carat."',total_diamond_price='".$total_diamond_price."',SolitaireQuality='".$sol_quality."',SolitaireColor='".$sol_color."',SolitaireType='".$sol_type."',No_Solitaire='".$sol_no_diamonds."',Solitaire_Value='".$sol_diamond_value."',sollitaire_Carat='".$s_carat."',total_sollitaire_price='".$total_sollitaire_price."',Diamond_Creation_Type='".$diamond_type."',Solitaire_Creation_Type='".$sol_diamond_type."',Product_Size='".$product_size."',add_to_product='No',confirm='No',item_no='".$item_no."',total='".$total_price."'","Temp_Id='".$temp_id."' and serial_no='".$serial_no."'");

echo $new_serial_no = $serial_no+1;

?>