我试图使选框文本在php使用mysql数据,但这是脚本只显示简单的mysql数据。我如何在我的php页面上显示选框?请帮我解决这个问题。由于
<?php
$con=mysqli_connect("something.com","someusername","somepassword.","somedatabase");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM itomi");
while($row = mysqli_fetch_array($result))
{
echo "{$row['ntitle']}: {$row['ndetails']} ";
echo "</font></marquee>";
}
mysqli_close($con);
?>
我希望你想在一个选框中打印列表
echo "<font><marquee>";
while($row = mysqli_fetch_array($result))
{
echo "{$row['ntitle']}: {$row['ndetails']} <br>";
}
echo "</font></marquee>";