我在选择区域看不到结果
<?php
require 'config.php';
$query = "SELECT cat_id, category FROM categories LIMIT 1";
$result = mysqli_query($con,$query);
if(!$result){
echo 'Query failed : '.mysqli_error();
exit(0);
}
while($row = mysqli_fetch_assoc($result)) {
echo '<select name="cat_id">
' . $row['cat_id'] . '
</select>';
}
mysqli_close($con);
?>
我尝试添加 HTMLselect
标签,但它仍然无法正常工作。