i have written some sql code to output values from a database based on the first dropdown selection, but i can see the values being returned through inspect element in the console but my text field is blank
<?php
$connection = mysqli_connect("localhost", "root", "");
$sn = $_REQUEST['get_option'];
mysqli_select_db($connection, "dqa");
$result = mysqli_query($connection, "SELECT * FROM action_plan WHERE sn = '".$sn."' GROUP BY site");
while($row = mysqli_fetch_array($result))
{
?>
<input type="text" name="site" value="<?php echo $row['site']; ?>">
<?php
}
mysqli_free_result($result);
mysqli_close($connection);
?>