title: php mysql storing line breaks in text area in database
body: <p>I have an input textarea and I would like to store the line breaks that a user makes in the text area in the database, so that it echoes the output text the same way as in the input text</p>
  
  <p>eg:</p>
  
  <pre><code>Some text some text some text some text
  
  
  new line some text some text new line 
  
  new line some text new line some text
  </code></pre>
  
  <p>this is my current upload script:</p>
  
  <pre><code>$sql = "insert into people (price, contact, category, username, fname, lname, expire, filename) values (:price, :contact, :category, :user_id, :fname, :lname, now() + INTERVAL 1 MONTH, :imagename)";
  $q = $conn-&gt;prepare($sql) or die("failed!");
  $q-&gt;bindParam(':price', $price, PDO::PARAM_STR);
  $q-&gt;bindParam(':contact', $contact, PDO::PARAM_STR);
  $q-&gt;bindParam(':category', $category, PDO::PARAM_STR);
  $q-&gt;bindParam(':user_id', $user_id, PDO::PARAM_STR);
  $q-&gt;bindParam(':fname', $fname, PDO::PARAM_STR);
  $q-&gt;bindParam(':lname', $lname, PDO::PARAM_STR);
  $q-&gt;bindParam(':imagename', $imagename, PDO::PARAM_STR);
  $q-&gt;execute();
  </code></pre>