View Single Post
  #1 (permalink)  
Old 07-07-2004, 03:24 PM
amorphic8's Avatar
amorphic8 amorphic8 is offline
WebProWorld Member
 

Join Date: Oct 2003
Location: San Jose
Posts: 69
amorphic8 RepRank 0
Default annoying PHP mySQL textbox problem

I have created a form that allows site owners to add, edit and delete events from their calendar pages.

It all works fine except for the textbox.

When the original form is filled out, the text that comes from the text box is converted using nl2br (new line to
) before storing in the database. I have taken this step to preserve the formatting typed in by the user. When the calendar or events page is called, the information has line breaks in the right places and the desired effect is acheived.

for example if the original is:

event information line1
event information line2
event information line3

in the database it looks like:

event information line1

event information line2

event information line3



The problem is when the event is edited. The editEvent.php script pulls the text from the database and pops it into a textbox for editing. The
's show up in the textbox. Is there an anti-function for nl2br?
__________________
amorphic8
http://www.amorphicmedia.com
Reply With Quote