title: Push a button and update the comments in the mysql db with the text areas that contain the comments
body: <p>The question might seem a little odd but I will show you what I mean :)</p>
  
  <p>So I have made a webpage that contains comments that have been made by authorised users (teachers). That is another piece of code in another page so that works perfectly.
  Of course it should be possible for the person who made the comment to change his own comments in case of mistakes etc.</p>
  
  <p>I managed to show the user his own comments with his comments in seperate text areas.
  The text areas have no specific name and are just called txtComment, how do I make them unique for every comment (which is flexible because comments can be added later).
  I think that is the issue why I cannot update the changed/adapted textareas after I press the button.</p>
  
  <p>I hope you guys understand what I am trying to say :p</p>
  
  <p>I changed Dutch words mostly to English so if there is a spelling error that is due to that :)</p>
  
  <p>This is the code:</p>
  
  <pre><code>&lt;?php
  $sqlKlas = "Select * from tblcomments WHERE ForWho='".$_SESSION['User']."' AND ForWho='6HA1' OR VoorWie='6HA2'";
  $resultKlas = mysql_query($sqlKlas) or die(mysql_error());
  if (isset($_POST['btnAdaptCommentKlas'])){
      while($rowKlas = mysql_fetch_array($resultKlas)){
          $CommentNr = $rowKlas['CommentNr'];
  
          $sqlUpdate = "Update tblcomments SET Comment='".$_POST['txtComment']."' WHERE CommentNr=$CommentNr";
          $resultUpdate = mysql_query($sqlUpdate) or die(mysql_error());
  
          echo "&lt;tr&gt;";
          echo "&lt;td&gt;";
          ?&gt;&lt;textarea name="txtComment" cols="80" rows="5"&gt;&lt;?php echo $rowKlas['Comment']; ?&gt;&lt;/textarea&gt;&lt;?php
          echo "&lt;/td&gt;";
          echo "&lt;td&gt;".$rowKlas['ForWho']."&lt;/td&gt;";
          echo "&lt;td&gt;".$rowKlas['Datum']."&lt;/td&gt;";
          echo "&lt;/tr&gt;";
      }
  }
  else {
      while($rowKlas = mysql_fetch_array($resultKlas)){
          echo "&lt;tr&gt;";
          echo "&lt;td&gt;";
          ?&gt;&lt;textarea name="txtComment" cols="80" rows="5"&gt;&lt;?php echo $rowKlas['Comment']; ?&gt;&lt;/textarea&gt;&lt;?php
          echo "&lt;/td&gt;";
          echo "&lt;td&gt;".$rowKlas['ForWho']."&lt;/td&gt;";
          echo "&lt;td&gt;".$rowKlas['Datum']."&lt;/td&gt;";
          echo "&lt;/tr&gt;";
      }
  }
  </code></pre>