Page 1 of 1

Exclusions problem

Posted: Thu Sep 11, 2003 12:09 am
by 3.14
if( $code_so_far = "ANNNNLKX" )
{
echo "Your Code is Valid";
}

Ok, here's the problem. No matter what code gets put in, it always displays "Your Code is Valid". How do I set it so that it only displays "Your Code is Valid" if the above code is entered?

Posted: Thu Sep 11, 2003 2:00 am
by JAM

Code: Select all

if( $code_so_far = "ANNNNLKX" )
...means that you set $code_so_far to that value each time you run it, ie. it will allways match.

Note the difference between using = and == ? ;)