The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Sometimes I use some common variable names in my code, which is passed. How can I prevent that variable from being defined in the url for ex: http://www.domain.com/index.php?hits=1231231231232312
Or is it so that when the variable is already defined, it cannot be defined through url? Thanks |
#2
|
||||
|
||||
![]()
in the first line of your script you can use unset($hits);
also if the varialbes are sent through a form, they will overwrite the urlvariables |
#3
|
||||
|
||||
![]()
Ah...so what is isset?
|
#4
|
||||
|
||||
![]()
So for example, before the rest of the code starts I would put
PHP Code:
also can you do this to multiple variables at once like? PHP Code:
|
#5
|
||||
|
||||
![]()
if you unset the var, you can redifine it later in the script without any problems
![]() look into global.php there are a lot of unsets ![]() i don't think you can unset more vars in one line... |
#6
|
||||
|
||||
![]() Quote:
eg: PHP Code:
|
#7
|
||||
|
||||
![]()
Ah thanks, I checked on php.net and unsetting multiple variables seems to be possible.
Thanks Guys! |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|