All of my editable content through my table creates about 3 tab whitespaces in front of text whenever it is submitted to the table.
Has anyone had this problem before?
The table data is of type TEXT, and it's updated through a simple UPDATE table SET blah=blah WHERE blah
Whitespace in my tables
Moderator: General Moderators
is the value comming from a textarea by any chance?
use
before the insert statement
use
Code: Select all
trim($value)- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Why, yes it is. My other company always uses FCKeditor, so I hadn't touched textareas in a while. Thank you
This get's rid of whitespace in the document it's displayted it, but trim isn't quite doing it for the text displayed inside of the textare. It no longers add more whitespace, but it keeps the initial 3 tabs, regardless of the application of trim(). I'll probably figure it out though.
This get's rid of whitespace in the document it's displayted it, but trim isn't quite doing it for the text displayed inside of the textare. It no longers add more whitespace, but it keeps the initial 3 tabs, regardless of the application of trim(). I'll probably figure it out though.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
yes indeed. a common mistake is to write textarea like this
Code: Select all
<textarea name='name'>
</textarea>
' when it should be
<textarea name='name'></textarea>