I'm primarily a ColdFusion programmer, and I'm a bit confused about how session variables (how indeed all variables) are scoped in PHP.
For example(I'm new - be gentle!) I'm registering a session variable called UserID. I want to check if that variable has content, and if it does, to print it to the screen. To do this I'm using isSet and check to see if the string is empty (!='').
But if I simply pass in a URL variable called userID it still prints that variable to the screen. So how do I get PHP to know what kind of variable it is that's being sent? Are there ways of defining scope in PHP?
Thanks in advance and sorry for being a nuisance.
For example(I'm new - be gentle!) I'm registering a session variable called UserID. I want to check if that variable has content, and if it does, to print it to the screen. To do this I'm using isSet and check to see if the string is empty (!='').
But if I simply pass in a URL variable called userID it still prints that variable to the screen. So how do I get PHP to know what kind of variable it is that's being sent? Are there ways of defining scope in PHP?
Thanks in advance and sorry for being a nuisance.