[PHP] Can't compare a decrypted variable to a string ?

2005-10-13 Thread Graham Anderson
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);//

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

2005-10-13 Thread Robin Vickery
On 10/13/05, Graham Anderson [EMAIL PROTECTED] 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' [...]

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

2005-10-13 Thread Jochem Maas
Graham Anderson wrote: 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

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

2005-10-13 Thread Graham Anderson
many thanks :) I'll try this g On Oct 13, 2005, at 10:27 AM, Jochem Maas wrote: Graham Anderson wrote: 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 =