01-22-2010, 09:27 AM
[eluser]Wittner[/eluser]
Hi,
I've used the encryption library with CI before and have not had a problem, however at the moment, something is driving me nuts and I can't figure out why it won't work.
My database has a field which gets encrypted when I post a form. I can view the resulting encryption and it looks fine.
I then do a query, pull out the data and when I try to display the decoded encryption I get a blank. If I don't decode it, I can see the encrypted version of the field. Here is a cut-down version of the code. Can't see what's wrong here and as I say it's working perfectly on another app!
The outputted field value is blank!
Can anyone shed any light on this?
Hi,
I've used the encryption library with CI before and have not had a problem, however at the moment, something is driving me nuts and I can't figure out why it won't work.
My database has a field which gets encrypted when I post a form. I can view the resulting encryption and it looks fine.
I then do a query, pull out the data and when I try to display the decoded encryption I get a blank. If I don't decode it, I can see the encrypted version of the field. Here is a cut-down version of the code. Can't see what's wrong here and as I say it's working perfectly on another app!
Code:
<?php foreach($query->result() as $item): ?>
...
<input type="text" name="customerName" value="<?=$this->encrypt->decode($item->customerName);?>" />
...
<?php endforeach; ?>
The outputted field value is blank!
Can anyone shed any light on this?