doumei2023 2018-06-08 13:36
浏览 66
已采纳

使用db数据填充textarea填充问题

So, like the title said, i'm having an issue while i'm populating a text area that is being used on HTML form, because it is not getting any content in it.

this is the form with the php while.

<?php
while ($row = mysqli_fetch_array($query))
{ echo '

    <form action="insert/insertReport.php" id="newReport" method="post">

    <div class="form-group">
        <label for="clientRep">Cliente</label>
        <br>
        <input type="text" name="client" class="form-control" id="client" value="'.$row['client'].'">
    </div>
    <div class="form-group">
        <label for="titleRep">Título do Relatório</label>
        <br>
        <input type="text" name="title" class="form-control" id="title" value="'.$row['title'].'">
    </div>
    <div class="form-group">
        <label for="namefat">Data</label>
        <br>
        <input type="text" name="date" class="form-control" id="date" value="'.$row['date'].'">
    </div>
    <div class="form-group">
        <label for="localRep">Local</label>
        <br>
        <input type="text" name="local" class="form-control" id="local" value="'.$row['local'].'">
    </div>
    <div class="form-group">
        <label for="reportRep">Relatório</label>
        <br>
        <textarea rows="12" name="report" class="form-control" id="report" form="newReport" value="'.$row['report'].'"></textarea>
    </div>
    <input type="hidden" name="id" class="form-control" id="id" value="'.$row['id'].'">';

}?>

And this is the php query.

$sql = 'SELECT * FROM reports'

Does anyone know what's wrong with it?

  • 写回答

1条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 C# 循环读写数据中途突然变慢
      • ¥100 CVI2012 做暗通道图像去雾思路详细步骤
      • ¥15 用Java实现双端队列
      • ¥150 ID3决策树实现分类
      • ¥15 multisim10安装后,找不到NI License Manager的程序来安装许可证
      • ¥15 C++银行卡系统 Help!
      • ¥15 R语言数据分析的相关问题
      • ¥15 模型导入SP后贴图纹理只有一个,拆了四张UV的,怎么解决?
      • ¥15 检索带order by 非常慢
      • ¥20 python 爬虫 token 加密方式