title: How to add a new text to existing one and identify specific user in php+mysql?
body: <p>i want to make a form where people can add some info, and that will add up to the existing info in the table in mysql. Like lets say the "dates" column, i have info such as 05.05.2020, 01.05.2020. And i want to ADD 11.05.2020 to near of the 05.05.2020, and 01.05.2020. When i do that, it just erases this info and adds only 11.05.2020. But i want it to look like 05.05.2020, 01.05.2020,11.05.2020.
  And the second thing which i dont know how to do, is how to match the users form input with the data within the mysql? Lets say in form it says Username:, Date:. Username puts 0001, and php takes that value and matches it with mysql username column. If it exists, it adds date to that specific users table.
  Here is my code:
  html:</p>
  
  <pre><code> &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;
  &lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form action="process.php"&gt;
  &lt;center&gt;
  &lt;label for="accnum"&gt;Username&lt;/label&gt;&lt;br&gt;
  &lt;br&gt;
  &lt;input type="text"  name="accnum" id="accnum"&gt;&lt;br&gt;
  &lt;br&gt;
  &lt;label for="date"&gt;Date&lt;/label&gt;&lt;br&gt;
  &lt;input type="text"  name="date" id="date"&gt;&lt;br&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and my process.php</p>
  
  <pre><code>&lt;?php
  
  $link = mysqli_connect("localhost", "root", "123", "jbex");
  
  
  if($link === false){
      die("w. " . mysqli_connect_error());
  }
  
  $accnum = mysqli_real_escape_string($link, $_REQUEST['accnum']);
  $date = mysqli_real_escape_string($link, $_REQUEST['date']);
  
  
  $sql = "UPDATE accounts (date) VALUES ( '$date' WHERE $accnum=?)";
  if(mysqli_query($link, $sql)){
      echo "success.";
  } else{
      echo "ERROR: " . mysqli_error($link);
  }
   mysqli_close($link);
  ?&gt;
  </code></pre>
  
  <p>What to put near WHERE "$accnum=" so it takes the users input with the form named accnum?
  Thanks for reading and help </p>