NerdConcepts Posted March 11, 2007 Share Posted March 11, 2007 I've tried a few things that I found on the forum but nothing seems to work. What I have is submitted information from a textarea. This submitted information is..for example This is my multiple line description another part of the description is down here... well when I echo the value of what is stored in that textarea that was submitted to the database, is shows up like This is my multiple line descriptionanother part of the description is down here... Not really sure why, if I use phpMyAdmin to view the database it stores it with multiple lines...not sure at all on how to do this one. Plus it's now 5am so It's time I go to sleep maybe...or at least try, lol Link to comment https://forums.phpfreaks.com/topic/42206-solved-textarea-display-problem/ Share on other sites More sharing options...
tauchai83 Posted March 11, 2007 Share Posted March 11, 2007 maybe n2lbr that is what you need to display it correctly. Link to comment https://forums.phpfreaks.com/topic/42206-solved-textarea-display-problem/#findComment-204733 Share on other sites More sharing options...
NerdConcepts Posted March 11, 2007 Author Share Posted March 11, 2007 Well it's a little different then I thought, but it does work. When you use echo nl2br(htmlspecialchars($row['vendor_desc'])); for the actual echo location, well it doesn't parse the <br /> so you actually have to go back up near the query for the rows and define a variable...like this $vdesc = $row['vendor_desc'])); then you have to then apply the nl2br. $vdesc=nl2br(htmlspecialchars($vdesc)); then when you echo $vdesc it displays everything correctly. Showing this stuff just in case someone else has this problem later. Thank a lot for the help. Link to comment https://forums.phpfreaks.com/topic/42206-solved-textarea-display-problem/#findComment-204893 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.