Can't compare a decrypted variable to a string ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For some reason,
I have to store a decrypted string as a variable before I can compare it to another string.

The decrypt function is located in another php script

//Get variable
$cmd = $_REQUEST['cmd'];

echo $cmd; //  uJy4p09z6bSR80eLNFnBWBj/EsRCfIz2C/WrcFNcZE8=
echo decrypt($cmd);    // makesmil

 $realcmd =  decrypt($cmd); // 'makesmil'

if( decrypt($cmd)== 'makesmil') makesmil (); // FAILS elseif( decrypt($cmd)== $realcmd) makesmil(); // SUCCEEDS

I'm sure it is something stupid

what am I doing wrong ?
g

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux