I’m new to PHP, I’ve made a connection to the database at the top of the page, it’s simple I just want to show the Cost of the second player in my table Cards, the issue is that nothing is displayed at all on my page
[php]<?php
$query = "SELECT Cost FROM cards where PlayerID = 2";
if ($result = mysqli_query($con, $query)) {
/* fetch associative array */
while ($row = mysqli_fetch_assoc($result)) {
echo ($row["Cost"]);
}
}
?>[/php]