<?php 

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

$p_cate = $_REQUEST['p_cate'];

$metal_type = $_REQUEST['metal_type'];

if($metal_type=="GOLD"){
	
$metal_id = "G";
	
}

if($metal_type=="SILVER"){
	
$metal_id = "S";
	
}

$new_code=$Mainclass->create_design_code($metal_id,$metal_type,$p_cate);

$array = explode(",",$new_code);

$Last_P_Code = $array[0];
$design_code = $array[1];
$Product_Name = $array[2];

echo $Last_P_Code."*".$design_code."*".$Product_Name;

?>