|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
Inserting Formated Text Areas to MySQL
My site takes data from a text area on the page and inserts it into a Longtext field in a MySQL table. The problem is, in order to get paragraph formating etc I have to write my entries in HTML code. I know that it is possible to get the page to recognise return characters etc and insert the appropriate information into the database, but I cannot find out how to do it.
Does anybody out there know? PS- I oticed that this forum software is capable of doing it : ) |
|
#2
|
|||
|
|||
|
RE: Inserting Formated Text Areas to MySQL
I managed to find my own answer, thought I'd post it in case someone else has the same problem.
Use the php command nl2br(string). it replaces all new line characters in the string with HTML <br> entities. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Inserting Formated Text Areas to MySQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|