How to make a choice of the goods in a category?

Good evening!
I decided actually to make a option when you select the corresponding category are displayed in another option the goods selected category. But I have no idea how to link these two option to make it work.
Please tell me how it can be implemented well, or maybe someone has a simple example.
Here, for clarity, as I do select.
<form method="POST" action="">
 <p>Delete product</p>

 <label for="category_c">category Name</label>
 <select name="category_c" id="category_c"
<?php
 $db_connection = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); 
 mysqli_set_charset($db_connection, "utf8"); 
 $sql = ("SELECT * FROM categories"); 
 $result = mysqli_query($db_connection, $sql) 
 or die(mysqli_error($db_connection)); 
 echo "<select name='category_c'>";
 while($row = mysqli_fetch_row($result)){
 echo "<option value='".$row[0]."'> $row[1] </option>"; 
 } 
 echo "</select>";
?>
</select>

 <label for="product_del">item Name</label>
 <select name="product_del" id="product_del"
<?php
 $db_connection = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); 
 mysqli_set_charset($db_connection, "utf8"); 
 $sql = ("SELECT * FROM product"); 
 $result = mysqli_query($db_connection, $sql) 
 or die(mysqli_error($db_connection)); 
 echo "<select name='product_del'>";
 while($row = mysqli_fetch_row($result)){
 echo "<option value='".$row[0]."'> $row[1] </option>"; 
 } 
 echo "</select>";
?>
 </select>
March 23rd 20 at 18:58
1 answer
March 23rd 20 at 19:00
Solution
One PHP will not do, it needs JS.
For example, this library is able to: https://github.com/tuupola/jquery_chained
But if I need to take values from database? - randal_Flatley commented on March 23rd 20 at 19:03
Cm. section "Usage with AJAX" in the documentation - Nico12 commented on March 23rd 20 at 19:06
Thanks for the reference. Always hand wrote. :) - Ara commented on March 23rd 20 at 19:09

Find more questions by tags MySQLPHP