我想在我的组合框中添加“请选择...”作为第一个选项。请参阅下面的代码 - 有什么建议吗?
问候,彼得
<?php
mysql_connect ("localhost", "username", "password");
mysql_select_db('mysqldb');
$sql = "SELECT data_id FROM projects";
$result = mysql_query($sql);
echo "<select name='data_id '>";
$sql[0] = 'Please select...';
while ($row = mysql_fetch_array($result))
{
echo "<option value='" . $row['data_id '] . "'>" . $row['data_id'] . "</option>";
}
echo "</select>";
?>