Well, I made an extract that selects the data from the DB and prints it on the screen through the while, which is generating the correct values, but now I'm trying to create an edit button that opens a popup with the inputs already populated with the values, but this form is only receiving the values of the 1st loop. Anyone have any suggestions for solving the problem?
Here is the code I'm trying to fix:
while($linha=$buscarextrato->fetch(PDO::FETCH_ASSOC)){
echo '
<div class="div" style="border:0px;width:80px;">
<div data-role="popup" id="Popup" class="ui-content" style="min-width:500px;">
<form style="display:inline;" name="lanc" action="editalanc.php" method="POST" enctype="multipart/form-data" >
<input type="hidden" name="numlanc" value="'.$linha[lancamento].'"/>
<input type="date" name="data" value="'.$linha[data].'"/>
<input type="number" name="debito" value="'.$linha[debito].'"/>
<input type="number" name="credito" value="'.$linha[credito].'"/>
<input type="number" name="valor" value="'.$linha[valor].'"/>
<input type="text" name="descricao" value="'.$linha[descricao].'"/>
</form>
</div>
<a href="#Popup" data-rel="popup"><i class="material-icons">mode_edit</i></a>
</div>
';
JS code obtained by reference:
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script><scriptsrc="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
CSS:
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
The generated values (line) vary correctly in each loop, the only thing that does not change is the form, it seems to me that it gets the value of 1 loop and ignores the rest. / p>