How to create a dynamic table?

In General, there is a form:
5cf2a56ba3dee584384638.png
By clicking the button to search in the database and output the found values need to display those values in a kind of table and learn to choose a specific string.
Tell me how to do it?
DB query:
$query = $pdo->prepare('SELECT * FROM `flight_list` WHERE `from` LIKE ? AND the `where` part LIKE ? AND `from_d` LIKE ?');
 $query->execute([$k_value, $o_value,$tdate_value]);

 while($row = $query->fetch(PDO::FETCH_ASSOC)) {
 echo ',' . $row['from'] . ',' . $row['where'] . ',' . $row['from_d'] . ',' . $row['type'] . ',' . $row['price'] . ',' . $row['number_flight'] . ',' . $row['tickets'];
 }

Using AJAX get the result of the query-side JS.
Here in this problem, made headlines with span:
<span class="title-output">Select</span>
 <span class="title-output">Location</span>
 <span class="title-output">Where</span>
 <span class="title-output">date of departure</span>
 <span class="title-output">Class</span>
 <span class="title-output">Price</span>
 <span class="title-output">flight Number</span>
 <span class="title-output">number of tickets</span>

5cf2a84ac9ae7377450728.png
March 23rd 20 at 18:41
1 answer
March 23rd 20 at 18:43
And chomu VI is not wearitout html

Find more questions by tags Web Development