mo_ib_bmw Posted July 21, 2008 Share Posted July 21, 2008 helloi have small questionhow i can do automatic <br>i meani do script notevisitor but when any visitor add note and he write note click on Enter button in kebored don't do <br> and the text save in databases 1 line !and when i write <br> the text save in databses 2 line when i view !How can I make to do so as forum when i click Enter button when i write the text do auto <br> and i don't need to write <br> with my texti know programmer language html,css,php,mysqli hope you know what i mean and help methanx... Link to comment Share on other sites More sharing options...
justsomeguy Posted July 22, 2008 Share Posted July 22, 2008 You can use PHP's nl2br function to convert newline characters to <br> tags.http://www.php.net/manual/en/function.nl2br.php Link to comment Share on other sites More sharing options...
Jesdisciple Posted July 22, 2008 Share Posted July 22, 2008 EDIT: And I forget about that function once again. Link to comment Share on other sites More sharing options...
mo_ib_bmw Posted July 23, 2008 Author Share Posted July 23, 2008 thanx for helpbut to now i can't do itif any one have function or other think to use it with example Link to comment Share on other sites More sharing options...
Synook Posted July 23, 2008 Share Posted July 23, 2008 $text = nl2br($_POST['text-from-note-form']); Link to comment Share on other sites More sharing options...
mo_ib_bmw Posted July 23, 2008 Author Share Posted July 23, 2008 thanx very much Synook Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.