Right, I've thought of jsut about everything, and everything I think of seems flawed. The problem is this - if you have a text area in a form to save to a file, you can stripslashes() and str_replace "\r" with "<br />" and then the browser will display it properly just by reading the text file. However, to display it again in a textarea, for editing etc, I have to replace "<br />" with "\r". But that's ok, I can write a MuliLine(textorhtml) function to turn it either to text or to html friendly versions.
The problem is, how do I include it in a form hidden input field!!! The problem lies in that any variable you've taken from a form could contain a ", and even if it is escaped, if you try putting it in a input type="hidden" value="$whatever" then you'll find it still goes wrong and ends the value at the escaped " in the variable if there is one. Anyone got any bright ideas? *mutters he wouldn't have this problem if he had access to mysql for free* =/ _________________________________
Leozack
The problem is, how do I include it in a form hidden input field!!! The problem lies in that any variable you've taken from a form could contain a ", and even if it is escaped, if you try putting it in a input type="hidden" value="$whatever" then you'll find it still goes wrong and ends the value at the escaped " in the variable if there is one. Anyone got any bright ideas? *mutters he wouldn't have this problem if he had access to mysql for free* =/ _________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);