我该如何启动它?我知道我需要在下拉列表中的选项中进行 mysql 查询,但是如何转换数据。请记住,它在一个表单中,用于从 MySQL 表中发送结果。
(编辑)
我在 printf 里面工作这就是我想要的:
<?php ob_start();
include('/../../config.php');
if(isset($_POST['edit_id']) && !empty($_POST['edit_id'])) {
$edit_id = mysql_real_escape_string($_POST['edit_id']);
$result = mysql_query("SELECT username, password, nome, cidade, pais, base, isactive, admin, dov, checador, dinheiro, email, datanascimento, profissao, idivao, idvatsim, horas, rank FROM acars_users WHERE `id`='".$edit_id."'");
$resultdl = mysql_query("SELECT * FROM acars_hubs");
$data = mysql_fetch_array($result);
$dl = mysql_fetch_array($resultdl);
printf("<div align=\"center\">
<br><form method=\"post\" action=\"editar2.php\">
<p><font size=\"2\" face=\"Segoe UI, Arial, Helvetica, sans-serif\" align=\"center\">Modifique os campos que deseja para <strong>editar este membro.</font><br>
<br>
<table width=\"700\" border=\"0\" align=\"center\" >
<tr>
<td>Base Operacional:</td>
<td><label for=\"hub\"></label>
<select name=\"hub\">
<option>".$dl['name']."</option>
</select>
</td>
</td>
</tr>
</table></br></br>
<input name=\"edit_id\" value=\"$edit_id\" type=\"hidden\">
<input type=\"image\" src=\"img/Editar.PNG\" width='85' height='30'></form>
</form>
</table>
</div>
");
while ($data = mysql_fetch_array($result));
while ($dl = mysql_fetch_array($resultdl));
ob_end_flush();
?>