You are here: Re: [PHP] Can't compare a decrypted variable to a string ? « PHP « IT news, forums, messages
Re: [PHP] Can't compare a decrypted variable to a string ?

Posted by Robin Vickery on 10/13/05 19:17

On 10/13/05, Graham Anderson <grahama@siren.cc> wrote:

> $realcmd = decrypt($cmd);
[...]
> elseif(decrypt($cmd) == $realcmd)

That's obviously going to succeed no matter what $cmd decrypts into.
It doesn't really tell you anything useful.

> $realcmd = decrypt($cmd); // 'makesmil'
[...]
> if( decrypt($cmd) == 'makesmil')

If this really fails, it means that $cmd doesn't decrypt into
'makesmil'. Are you sure that it's not been padded with spaces or
something?

-robin

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация