如何检查MySQL中的字段以显示它是否为空?

I'm working on an online store & I've got a big problem while I'm trying to retrieve colors of products and show them to users in Html check boxes. I inserted four fields to my database and set them to the variables $pro_one, $pro_two, $pro_three, $pro_four. But the problem is some of products has only two colors for example and I don't want the the page shows the other 2 check boxes. To do this I need to write an If else statement to check the fields in phpmyadmin to see if each field is not empty, show it and else just don't show it. So please if you know how to do this please help me out I really appreciate that! thanks...

<?php 
                    if (isset($_GET['pro_id'])){
                        $product_id = $_GET['pro_id'];
                        $get_pro = "select * from products where product_id='$product_id'";
                        $run_pro = mysqli_query($con,$get_pro);
                        while($row_pro = mysqli_fetch_array($run_pro)){

                            $pro_id = $row_pro['product_id'];
                            $pro_cat = $row_pro['product_cat'];
                            $pro_brand = $row_pro['product_brand'];
                            $pro_title = $row_pro['product_title'];
                            $pro_price = $row_pro['product_price'];
                            $pro_image = $row_pro['product_image'];
                            $pro_desc = $row_pro['product_desc'];
                            $pro_key = $row_pro['product_keywords'];
                            $pro_date = $row_pro['date_added'];
                            $pro_ava = $row_pro['input_ava'];
                            $pro_rate = $row_pro['site_rate'];
                            $pro_rev = $row_pro['product_review'];
                            $pro_plast = $row_pro['last_price'];
                            $pro_warran = $row_pro['product_warranty'];
                            $pro_pre = $row_pro['gooya_present'];
                            $pro_colors = $row_pro['ava_colors'];
                            $pro_one = $row_pro['color_one'];
                            $pro_two = $row_pro['color_two'];
                            $pro_three = $row_pro['color_three'];
                            $pro_four = $row_pro['color_four'];


echo "<form id='submittion'> 
                                    <label style='font-family: BMehrBold, Arial, Helvetica, sans-serif;'>Quantity:</label>
                                    <input type='text' value='1' /></br></br>
                                    <table style='margin-bottom:10px;width: 100%;'>
                                        <tr>
                                            <td><input type='checkbox' name='colour' checked></td>
                                            <td><input type='checkbox' name='colour'></td>
                                            <td><input type='checkbox' name='colour'></td>
                                            <td><input type='checkbox' name='colour'></td>
                                        </tr>
                                        <tr>
                                            <td><p style='font-family: BMehrBold, Arial, Helvetica, sans-serif;'>$pro_one</p></td>
                                            <td><p style='font-family: BMehrBold, Arial, Helvetica, sans-serif;'>$pro_two</p></td>
                                            <td><p style='font-family: BMehrBold, Arial, Helvetica, sans-serif;'>$pro_three</p></td>
                                            <td><p style='font-family: BMehrBold, Arial, Helvetica, sans-serif;'>$pro_four</p></td>
                                        </tr>
                                    </table>
                                    <button type='button' class='btn btn-fefault cart'>
                                        <i class='fa fa-shopping-cart' ></i>
                                        Add to cart
                                    </button></br>
                                </form>";
?>

you can use the empty() function to check if a variable is empty or not

echo "
<form id='submittion'> 
<label style='font-family: BMehrBold, Arial, Helvetica, sans-serif;'>Quantity:</label>
<input type='text' value='1' /></br></br>
<table style='margin-bottom:10px;width: 100%;'>
    <tr>
        <td><input type='checkbox' name='colour' checked></td>
        <td><input type='checkbox' name='colour'></td>";
        <?php
        if(!empty($pro_three)){ echo "<td><input type='checkbox' name='colour'></td>
"; }
        if(!empty($pro_four)){ echo "<td><input type='checkbox' name='colour'></td>
"; }
        ?>
echo "
    </tr>
    <tr>
        <td><p style='font-family: BMehrBold, Arial, Helvetica, sans-serif;'>$pro_one</p></td>
        <td><p style='font-family: BMehrBold, Arial, Helvetica, sans-serif;'>$pro_two</p></td>
        <?php 
        if(!empty($pro_three)){ echo "<td><p style='font-family: BMehrBold, Arial, Helvetica, sans-serif;'>$pro_three</p></td>
"; }
        if(!empty($pro_four)){ echo "<td><p style='font-family: BMehrBold, Arial, Helvetica, sans-serif;'>$pro_four</p></td>
"; }
        ?>
    </tr>
</table>
<button type='button' class='btn btn-fefault cart'>
    <i class='fa fa-shopping-cart' ></i>
    Add to cart
</button></br>
</form>
";

I will suggest below solution:

<?php
 $colors[] = $row_pro['color_one'];
 $colors[] = $row_pro['color_two'];
 $colors[] = $row_pro['color_three'];
 $colors[] = $row_pro['color_four'];

 foreach($colors as $color) {
    $checked = "";
    if($color == "your color") {
      $checked = "checked";
    }      
    echo "<td><input type='checkbox' name='colour' $checked>$color</td>";   
 }

?>