Hi I'm using a WordPress Theme which appears to be doing something weird. I'm fairly new to the PHP side of things more familiar with older ASP stuff and can't seem to wrap my head around it or find anything on it either.
I'm using a prepared statement to insert text from a textarea into the database and also to pull back the information back into the textarea. Since I'm using a prepared statement I think I'm correct in that I don't need to escape any characters etc. and can insert just as is?
The problem I'm having is when the text from the database is being displayed inside of the textarea, it's obtaining some formatting somehow. Mainly it's open and closing p tags, this doesn't happen though when I create a test page outside of the theme. I did notice that the ' and " are being escaped I guess by the prepared statement?
All I'm doing is using echo between the open and close textarea where the value goes in both situations but I'm getting different results. What I don't get is how the theme could be overwriting my value at the time I overwrite in server side code? Are there some kind of events inside of PHP that could be capturing this with a function from the theme?
Right now the only way I can figure out to work around this is to create a separate page that echo's the information for that field and if I pull it back with ajax in JQuery it looks the way it should but there is a small delay for the box to load which I don't like…
I appreciate any help I can get here ahead of time…