[thelist] php speicial character conversion and carriage returns
kristina
kristina at kfx-design.co.uk
Tue May 7 04:16:01 CDT 2002
List,
I've created a little form that sends data to a database - one
element of the form is a text field that has the ability to put alot
of data into. One of the requirements of this field is that if
there is a carriage return its converted to a <br> - The trouble is
that if the entry is saved and uploaded and then opened to be edited
and then uploaded. All the <br>'s multiply....?!?! - I'm using:
$description = nl2br("$description");
What can I do so that it doesn't repeat the carriage returns on a
re-edit, bearing in mind that if new carriage returns are added they
will need to upload as such.
I've also been looking for a script that will change 'special
characters' into their ascii equivalent, on upload. Because at the
moment any special characters are being escaped. So the entry ends
up looking like this:
here is some data with lot\'s of special characters - Andy\'s quote
went something like this \"it\'s a fine night tonight\"
Huge thanks in advance.
;o)
--
bfn
~kristina
kristina at kfx-design.co.uk
http://kfx-design.co.uk/
More information about the thelist
mailing list