Re: Can't compare a decrypted variable to a string ?

From: Date: Thu, 13 Oct 2005 16:17:08 +0000
Subject: Re: Can't compare a decrypted variable to a string ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-224063@lists.php.net to get a copy of this message
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

« previous php.general (#224063) next »