I wrote a piece of boolean logic that doesn't work and I don't know
why. The code should ONLY do something if the session variable is
equal to 900123:
if( ! $_SESSION['SubscriptionID '] == '900123') {
//do some logic
}
However it always returns true. After staring at it for a while, I
realized that the PHP way of doing things is to use the != operator,
instead of putting ! at the front of the entire statement (I've been
doing too much Filemaker scripting). However I can't figure out why
this code shouldn't work. Does anybody have some insight?
Cheers,
Kevin
why. The code should ONLY do something if the session variable is
equal to 900123:
if( ! $_SESSION['SubscriptionID '] == '900123') {
//do some logic
}
However it always returns true. After staring at it for a while, I
realized that the PHP way of doing things is to use the != operator,
instead of putting ! at the front of the entire statement (I've been
doing too much Filemaker scripting). However I can't figure out why
this code shouldn't work. Does anybody have some insight?
Cheers,
Kevin
Comment