brown2005 Posted September 22, 2006 Share Posted September 22, 2006 hi,i have a text field where people will write there comments...i want to be able to say write text like,[b]hello hellohello hello[/b]keeping spaces in it....which form field type should i use input or textarea or neither?and how do i keep it with spaces.. Quote Link to comment https://forums.phpfreaks.com/topic/21656-help-with-textarea/ Share on other sites More sharing options...
ober Posted September 22, 2006 Share Posted September 22, 2006 textarea... and when you display the text from the database, wrap it in the function nl2br(). Quote Link to comment https://forums.phpfreaks.com/topic/21656-help-with-textarea/#findComment-96680 Share on other sites More sharing options...
AdRock Posted September 22, 2006 Share Posted September 22, 2006 Yes.here is how i display paragraphsecho nl2br($code['content']) Quote Link to comment https://forums.phpfreaks.com/topic/21656-help-with-textarea/#findComment-96683 Share on other sites More sharing options...
brown2005 Posted September 22, 2006 Author Share Posted September 22, 2006 but how do i insert it into the database, cause it puts it together if i just have...$comment = $_POST['comment']; Quote Link to comment https://forums.phpfreaks.com/topic/21656-help-with-textarea/#findComment-96688 Share on other sites More sharing options...
brown2005 Posted September 22, 2006 Author Share Posted September 22, 2006 ignore the last comment...it does workthanks all for your help.... Quote Link to comment https://forums.phpfreaks.com/topic/21656-help-with-textarea/#findComment-96696 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.