0
TABLE SIZE:
ID | NOME | PRECO
1 | 06x08 | 0.00
2 | 08x10 | 0.00
3 | 09x12 | 0.00
4 | 11x14 | 0.00
5 | 13x18 | 0.00
6 | 18x24 | 0.00
I need to update the prices... how do I do it using UPDATE
with PDO
Man SELECT
is thus along with a WHILE
<div class="panel-body">
<?php
$pdo = db_connect();
$listar = $pdo->prepare("SELECT * FROM tamanhos");
$listar->execute();
while ($dados = $listar->fetch(PDO::FETCH_OBJ)){
?>
<div class="form-group">
<label class="col-sm-2 control-label"><?php echo $dados->nome; ?></label>
<div class="col-sm-4">
<input type="text" name="tamanho[]" id="tamanho" class="form-control porcelana" value="<?php echo $dados->preco; ?>" />
</div>
</div>
<? } ?>
</div>