how to update form data with submit button in a while loop
<p>I am trying to figure out mysqli (I am just a starting scripter). I created the following script to grab 3 different values from my database. And it prints it on the screen in different textareas and input fields.</p>

<p>What I want to be able to do is when I press the update button that it'll update the records in the database for the form where the button is attached to.</p>

<p>Can anyone give me some tips on how to achieve something like that?</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
$sqlserver = &lt;SQLSERVER&gt;;
$sqluser = &lt;SQLUSER&gt;;
$sqlpassword = &lt;SQLPASSWORD&gt;;
$sqldatabase = &lt;SQLDATABASE&gt;;

$mysqli = new mysqli($sqlserver, $sqluser, $sqlpassword, $sqldatabase);

$loggedinuserid= "5";

$standaardtekstlabel = $mysqli-&gt;query("SELECT standaardtekst_label FROM Standaardteksten WHERE standaardtekst_account_pID='".$loggedinuserid."'");
$standaardtekstnl = $mysqli-&gt;query("SELECT standaardtekst_tekst FROM Standaardteksten WHERE standaardtekst_account_pID='".$loggedinuserid."'");
$standaardteksten = $mysqli-&gt;query("SELECT standaardtekst_tekst_en FROM Standaardteksten WHERE standaardtekst_account_pID='".$loggedinuserid."'");


while ($NL_Tekst = mysqli_fetch_row($standaardtekstnl))
{
 $label_Tekst = mysqli_fetch_row($standaardtekstlabel);
 $EN_Tekst = mysqli_fetch_row($standaardteksten);
 print '&lt;form action="" method="POST"&gt;
   &lt;input type="text" name="standaardtekst_label" value=' . $label_Tekst[0] . '&gt;
   &lt;textarea name="standaardtekst_tekst"&gt;' . $NL_Tekst[0] . '&lt;/textarea&gt;
   &lt;textarea name="standaardtekst_tekst_en"&gt;' . $EN_Tekst[0] . '&lt;/textarea&gt;
   &lt;input type="submit" value="update"&gt;
   &lt;/form&gt;';
}
?&gt;</code></pre>
</div>
</div>
</p>