![]() |
Issue with query
Not sure why this plugin isn't submitting the data to database. Yes, all form fields have names. 3 of the fields are arrays.
PHP Code:
|
I didn't study the entire thing, but I think the first line of your SQL needs the backquote moved to before the prefix, like:
Code:
INSERT INTO `" . TABLE_PREFIX . "thread_classifieds` ( ETA: also you should use escape_string() for all those values, like: Code:
'" . $vbulletin->db->escape_string($t_id) . "', |
doesn't the clean_gpc do that?
--------------- Added [DATE]1360438869[/DATE] at [TIME]1360438869[/TIME] --------------- BTW the issue was a { in my elseif statement BEFORE: PHP Code:
PHP Code:
|
Quote:
|
1 Attachment(s)
its multiple dropdowns like this [pictured in attachments]
|
Oh, right. Well, it's true I don't know the details of your application or who would have access to it, so maybe it's not an issue for you. But it is possible for a hacker to submit whatever string they want for any parameter, even if it's supposed to be coming from dropdown. Anyway, just thought I'd mention it.
|
Would you recommend this?
htmlspecialchars() PHP Code:
|
That works. You only need to do that if at some point you're going to display the values on a page. In fact now that I think about it, if you use a template and use {vb:var ...} and not {vb:raw }, I believe that takes care of it as well.
I guess another way would be, if they are coming from dropdown menus, make sure they match one of the expected values and if they don't, show an error or use a default. Anyway, sorry, I feel like I've made your task more difficult, and you didn't even ask about that. |
All times are GMT. The time now is 02:08 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|