title: How to append a string or value to an existing column in mysql php
body: <pre><code>&lt;?php
  if(empty($_POST['keyword_submit']) === false &amp;&amp; empty($errors) === true)
  {
  $data_keyword = array(
  'keywords'=&gt; $_POST['keywords']
  );  
  data_keyword($data_keyword);
  header('Location: keyword.php');
  exit(); 
  }
  ?&gt;
  &lt;form method="post" id="mainformkey"&gt;
  &lt;table width="100%"&gt;
  &lt;tr&gt;
  &lt;td style="padding: 5px;"&gt;
  &lt;table id="keyword_table" width="100%" border="1" &gt;
  &lt;tr&gt;
  &lt;th width="60%"&gt;
  Keywords
  &lt;/th&gt;
  &lt;th  width="10%"&gt;
  Keyword ID
  &lt;/th&gt;
  &lt;th  width="9%"&gt;
  Words
  &lt;/th&gt;
  &lt;/tr&gt;
  &lt;?php
  $keyword_sql1 = mysql_query("SELECT * FROM keyword");
  while($row_keyword_sql1 = mysql_fetch_array($keyword_sql1)){
  $id1 = $row_keyword_sql1[id];
  }
  if(isset($_POST[keyword_submit_add])){
  $values_keyword = $_POST['keywords_extra'];
  $ds = mysql_query("UPDATE keyword SET keywords = CONCAT(keywords,$values_keyword) WHERE id = '$id1'");  
  }
  $keyword_sql = mysql_query("SELECT * FROM keyword WHERE user_id='$session_user_id'");
  while($row_keyword_sql = mysql_fetch_array($keyword_sql)){
  $id = $row_keyword_sql[id];
  $get_keyword = $row_keyword_sql[keywords];
  ?&gt;
  &lt;tr&gt;
  &lt;td&gt;
  &lt;?php echo $get_keyword;
  ?&gt;
  &lt;/td&gt;
  &lt;td align="center"&gt;
  &lt;?php echo '@key-0'.$id;?&gt;
  &lt;/td&gt;
  &lt;td align="center"&gt;
  &lt;form id="addnew" method="post"&gt;
  &lt;input type="text" name="keywords_extra"&gt;
  &lt;input type="submit" name="keyword_submit_add" value="Add keyword"&gt;
  &lt;/form&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;?php
  }
  ?&gt;
  &lt;/table&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td style="background: #EDEDED; padding: 5px;"&gt;
  &lt;input type="text"  name="keywords"&gt;
  &lt;input  type="submit" name="keyword_submit" value="Main Keyword"&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/form&gt;
  &lt;?php
  function data_keyword($data_keyword)
  {
  array_walk($data_keyword, 'array_sanitize');
  $fields = '`' . implode('`, `', array_keys($data_keyword)) . '`';
  $data = '\'' . implode('\', \'', $data_keyword) . '\'';
  mysql_query("INSERT INTO `keyword` ($fields) VALUES ($data)");
  }
  ?&gt;
  </code></pre>
  
  <p>Here there are two submit buttons 1. First submit button: User can enter one keyword and submit (Name: Main keyword). 2. Second submit button: Second they can enter the keywords to a specific row which may append by a comma separated.</p>
  
  <p>I already tried that using CONCAT in mysql but only comma is getting appending and that too in the all the rows, but i need in specific row according to the id.</p>