![]() |
|
|
Thread Tools |
|
#1
|
||||
|
||||
|
Variable declaration and sanitization!
I have a series of variables I am declaring in a plug-in that fires in global_start.
These variables are all strings. What is the best way to sanitize the variables? Currently, I am declaring them like this: $ccDiscVar = ''; $ccHomeVar = ''; $ccCaleVar = ''; $ccBaseCity = ''; $urlArray = ''; [CODE FOLLOWS] Thanks for any comments. No members have liked this post.
|
|
#2
|
||||
|
||||
|
If you're getting them from $_POST, $_GET, or $_REQUEST, they should be cleaned using the $vbuletin->GPC class. There's a really good tuitorial in the articles section about this
__________________
Please feel free to PM me about custom work, installations, and upgrades! Eclipse Records - Streetcult Street Team No members have liked this post.
|
|
#3
|
||||
|
||||
|
Originally Posted by Antivirus
You mean the input cleaner class
, $vbulletin->input. $vbulletin->GPC simply holds cleaned values.You can also clean any value you want, not just GPC (get, post, cookies), using the input cleaner.
__________________
View My Modifications 29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x) Please do not PM me to ask for support - please use the relevant thread or forum. No members have liked this post.
|
|
#4
|
||||
|
||||
|
Originally Posted by Dismounted
Understood.
Thanks for the reply. I'll investigate the article. Appreciate the help. No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Thread Tools | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 01:58.



, $vbulletin->input. $vbulletin->GPC simply holds cleaned values.
