title: How do I store line-breaks from textarea properly in mySQL database?
body: <p>I've been having this issue with submitting and storing textarea content, to which I've been unable to find a proper solution.</p>
  
  <p>I have a form, with a textarea field, called "description".</p>
  
  <p>When I submit the form with multiline text, like</p>
  
  <blockquote>
    <p>Line 1<br>Line 2<br><br>Line 3</p>
  </blockquote>
  
  <p>It gets stored in the mySQL db with much more new lines. It becomes :-</p>
  
  <blockquote>
    <p>Line 1<br><br>Line 2<br><br><br>Line 3</p>
  </blockquote>
  
  <p>when I check the db with phpmyadmin.</p>
  
  <p>I've tried both VARCHAR and TEXT types, its the same. What do I need to do to store the textarea content accurately?</p>
  
  <p>The relevant codeigniter lines are
  aRow[$strField] = strip_tags($this->input->post($strField));
  $this->db->insert($this->strTable, $aRow);</p>
  
  <p>$strField will be my textarea field, and the insert is a CI function.</p>