![]() |
Having trouble with PDO
I am having a bit of trouble with an SQL statement and really don't know why.
Basically I am updating a forums information in the database. Everything is fine until I use certain characters. For whatever reason, I can use moderators and administrators, but not moderators and administrators ONLY. Trespassers will be violated. If it manages to update, the ONLY part of that string and on turns into >, so it reads moderators and administrators >. Before going into the database I am using trim(htmlspecialchars($form_data, ENT_QUOTES)) and using them in a prepared query. I really don't understand what could be causing this and never ran into this problem before. If it helps, the field this is getting inserted into is called desc (which I had probs with before, had to use `desc` to get it to work) which is just a text type field in mysql. |
Code please? Preeettttty please? (Is this long enough vBulletin? huh? HUHHH?)
|
Alright, this is the portion that is Updating, with a little bit of cleaning ( its for an admin area that honestly I will be the only one messing with ). Also note the $form_data is an array of the form fields via Xajax... so $form_data['title'] really is input name=title etc...
PHP Code:
I just can't pinpoint what would cause this, as it seems either the ! or . , ' is causing it (well ' is out now due to ENT_QUOTES). UPDATE - Problem not solved, but it seems to be the word 'only' screwing everything up. I have tried removing this word and it works correctly, but when I use 'only' in it it wont work. |
| All times are GMT. The time now is 08:41 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0