The most common mistake is to use only one equals sign in the conditional statement. When using PHP, a single = means something different than a double equals sign ==.
For instance:
If ($Login = 'Blue') {
<code here>
}
In this case you are actually setting $Login to be blue then checking whether it returns true. This will ALWAYS result in a TRUE statement.
Change the above statement to read:
If ($Login == 'Blue') {
<CODE HERE>
}
Another coding trick is to switch the order of the variable and value being checked like this:
If ('Blue' = $Login) ...
With this statement (which is incorrect) you will receive an error statement instead of it ALWAYS resulting in a TRUE statement since you cannot assign $Login to 'Blue'.
Hope this helps!
John Cornett
Senior Development Engineer
Web Teks, Inc.
http://www.web-teks.com
john@web-teks.com