Well, it should be simple enough.
All I want to do is take the content from a textbox, preserve its formatting and output into a php page. (Now, if you do not understand any of this, read no further.)
First of all there was this security issue of having it query the sql db and not allow an injection attack. Mucho thanks to Helio and Usrbingeek for help on that little issue. (And no, I did not forget, Helio does not have a website.)
So now I the code nicely in place, the data gets into the database in a nicely formatted matter... sort of... well, actually... NOT!
The issue seems to be, once again, no real uniform method of doing it. I am a stickler for valid code and will always try and write valid code. That makes sense.So, how do I deal with this issue?
My first thought was to just use a <pre> tag, set the width of the text area box right, turn word wrap on and use some php commands to get the HTML code right. Well, as most first thoughts go, that was a rather naive idea. So I do a google search for "HTML + textarea + php"
At first, I believed that wrap was actually an attribute of the <textarea> tag. I found a lot of articles talking about how to set it. Then I found one that seemed to speak the truth. It is a browser attribute, (NOT a tag attribute) coded differently in NN, IE and prone to errors in Mozilla and the defaults are set differently on different browsers. We have come so far on the compatibility issue... LOL
Then I find some links on word wrap commands. So I try that, and I am still getting nowhere. I am, like my text, going in circles.
By the Way, there is more to come... heh
