|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||||
|
||||||
|
Problem getting info from a DB to show correctly
I have a MySQL DB column labled news. It is a text type. My website shows this information on the main page. I have a CMS which uses a text area box to get the data for the DB. ILets say I type in
Quote:
It will display on the page Quote:
In the edit section of the CMS the text area box will show it correctly but not on the page If I insert a BR tag after the word hello it will show correctly Quote:
or Quote:
will display correctly. How do I get it to acknowldege news lines from the text area box without me having ot put in <br> tags. I have attached my scripts
__________________
CHornJr "One day I'll know what I am doing" ![]() My Blog Suanhacky Lodge #49 Rebel Squadrons |
|
#2
|
||||
|
||||
|
When you display the field value as HTML (not in the textarea, but in the display page), run it through the following function:
PHP Code:
It looks for newline characters and converts them to the line break tag. |
|
#3
|
||||
|
||||
|
Thank you
|
|
#4
|
||||
|
||||
|
also you could use
PHP Code:
|
|
#5
|
|||
|
|||
|
Quote:
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Problem getting info from a DB to show correctly |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|