----- Original Message ----- 
From: "Bruno Lustosa"
>> if ($item == 'blue')
> 
> Also, remember that the failsafe way to compare strings is not with
> ==, but using strcmp(). You might run into trouble if you compare two
> numeric strings using ==  (for example, "1" == "+1", which might not
> be what you want).

Hi Bruno,
Thanks for your reply.
Yes, I use strcmp(); which is really useful, but you have to be careful with it.

An example:
if (strcmp($_POST['user'], $_SESSION['pin']) == 0)
will match if both variables are blank.

You still need to check that both variables have a value, and the values are 
what you would expect to receive.
If there's PHP and a variable involved, someone will try and do something they 
shouldn't  with it, you can guarantee on that :-)
Regards, Bob.

Reply via email to