nu reusesc sa l fac sa fuctioneze
Variabila $pret vreau sa o actualizez , in coloana "pret" din baza de date unde sunt mai multe cifre ca de exemplu :
Cod: Selectaţi tot
pret
234
324
111
345
Cod: Selectaţi tot
///..............................
$id_user_F ="5";
echo '<form method=post action='.$_PHP_SELF.'>';
if ($resultw->num_rows > 0) {
while($rowm = $resultw->fetch_assoc()) {
$id_baza_M = $rowm['id_r'];
$pret = $rowm['preturi'];
$tabela .=
'<tr>
<td bgcolor=#7DA9F4><div class=texture_10><center>'.$id_user_M.'</center></div></td>
<td bgcolor=#7DA9F4><div class=texture_10><center>'.$numeutiliz.'</center></div></td>
<td bgcolor=#7DA9F4><div class=texture_10><center><input type="text" name="pret" value='.$pret.'></center></div></td>
<td bgcolor=#7DA9F4><div class=texture_10><center>'.$newDesignNumber.'</center></div></td>
</tr>';
if(isset($_POST['update']))
{
$preI = $_POST['pret'];
$skret = '$id_baza_M;
$connecty = mysqli_connect($host, $utilizator, $parola, $numebd);
// Check connection
if (!$connecty) {
die("Connection failed: " . mysqli_connect_error());
}
$sqlUpdate = "UPDATE account_balance SET pret = '$preI' id_r = ' $skret' WHERE id = '$id_user_F'";
}
}//bucla de while
}//bucla de $resultw
echo "<input name='update' class='paybutton' type='submit' value='Actualizare'>";
echo "</form>";
echo "<table>";
echo $tabela;
echo "</table>";
//////////////