$output = ''; if(isset($_POST["query"])) { $search = mysqli_real_escape_string($connect, $_POST["query"]); $query = " SELECT * FROM deserved WHERE DeName LIKE '".$search."' "; } else { $query = " SELECT * FROM deserved "; } $result = mysqli_query($connect, $query); if(mysqli_num_rows($result) > 0) { $output .= ' '; while($row = mysqli_fetch_array($result)) { $output .= ' <input type="text" " value="'.$row["DeFamilyNum"].'"> '; }
<?php echo "<select>"; while($row = mysqli_fetch_array($result)){ echo "<option>"; echo $row['DeFamilyNum']; echo "</option>"; } echo "</select>";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)