• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Insert() method question of the database class

#1
[eluser]phybertek[/eluser]
Hello,

I am inserting comments in to a listing I am writing. I'm using the Active Record method insert. I'm trying to figure out the best way to reserve or convert \n to <br>.

When data is posted this is what I see when I output the data from the database:

Input:

Hello, this is really coool!

-Phybertek

Results:

Hello, this is really cool! -Phybertek

-=-=-
Any ideas on the best way to input this data or output it?

Code:
public function comment_add()    
{

    // Insert into comments    
    $this->db->insert('comments',$_POST);
    redirect('list/event/' . $_POST['id'], 'location');


} //end comment_add
Even this post on this forum doesn't respect tabs.. How can you do this?


Messages In This Thread
Insert() method question of the database class - by El Forum - 06-09-2008, 05:23 PM
Insert() method question of the database class - by El Forum - 06-09-2008, 05:34 PM
Insert() method question of the database class - by El Forum - 06-09-2008, 05:37 PM
Insert() method question of the database class - by El Forum - 06-09-2008, 05:51 PM
Insert() method question of the database class - by El Forum - 06-10-2008, 08:34 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.