title: fetching textarea value and retain back value
body: <p>The problem is I am not able to retain textarea value back on page
  fetch value of the textarea from database but not able to retain its previous value.</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;textarea class="form-control" name="a" rows="3"&gt; &lt;/textarea&gt;
  </code></pre>
  
  <p><strong>PHP:</strong></p>
  
  <pre><code>$_SESSION['b']['page3']=$_POST; FETCHING VALUE IN SESSION
  
  $query = "INSERT INTO `a`(`textarea`) values('".$page3['B']."')";
  // inserted properly textarea value in database
  
  // now fetching textarea value
  
  $query  = "SELECT * FROM `a` WHERE `id` = '1'";
  $data       = mysqli_query($conn,$query);
  $result     =mysqli_fetch_array($data,MYSQLI_ASSOC);
  $textarea1 = $result['textarea'];
  </code></pre>
  
  <p><strong>Now want to retain textarea value:</strong></p>
  
  <pre><code>&lt;textarea class="form-control" rows="3" name="texta"&gt;
   //CODE FOR RETAINING TEXTAREA VALUE
  &lt;?php if(!empty($_SESSION['texta']))echo $_SESSION['texta']; ?&gt;
  &lt;/textarea&gt;
  </code></pre>