Ok, I have a few related things that I can't quite figure out, so I thought it would be a good idea to ask them all in one place.
1)
When something is submitted from a textarea input on my form, I need to make sure various characters don't mess anything up, is it best to use addslashes() or some other function?
2)
When I display the things that were submitted from the textarea (I save them in a mySQL database first), I need to have newlines replaced by <br> followed by a newline. I've never had to use that sort of function, so an example would be handy.
That's all I can think of for now, thanks in advance.
Just had a thought, been programming with php for god knows how long, and I've never needed to do this stuff... oh well.
1)
When something is submitted from a textarea input on my form, I need to make sure various characters don't mess anything up, is it best to use addslashes() or some other function?
2)
When I display the things that were submitted from the textarea (I save them in a mySQL database first), I need to have newlines replaced by <br> followed by a newline. I've never had to use that sort of function, so an example would be handy.
That's all I can think of for now, thanks in advance.
Just had a thought, been programming with php for god knows how long, and I've never needed to do this stuff... oh well.