Can,t insert data in database : I am try to insert data in database but not work. I want to insert color code in database which selected. 
Example, If i select cookware, then insert in database #A8CF45 this color code or If i select dinner, then insert in database #EDCA86 this color code.
Please help me how can i insert data.

Here is my frontend code:

    <select class="col-sm-9" id="cate" name="cate">
    	<option value="cookware">Cookware</option>
    	<option value="dinner">Dinner Set</option>
    	<option value="tiffin">Tiffin</option>
    	<option value="storage">Storage</option>
    </select>

Here is my backend code:

    <?php
    
    $cate=$_POST["cate"];
    
    if('cookware' == $cate){
    	$bg_color= '#A8CF45';
    }
    elseif('dinner' == $cate){
    	$bg_color= '#EDCA86';
    }
    elseif('tiffin' == $cate){
    	$bg_color= '#FBB12F';
    }
    elseif('storage' == $cate){
    	$bg_color= '#F26F35';
    }
    else{
    	$result=mysqli_query($conn, "INSERT INTO table( bg_color) VALUES ('$bg_color')")or die("Could not retrieve image: " .mysqli_error($conn));
    	echo 1;
    }	
    ?>