Welcome Guest, Not a member yet? Register   Sign In
Please Solve My Encryption problem..
#1

[eluser]anciwasim[/eluser]
Hi every one...thats very nice Community for support ...i belive...
i have on issue related to encryption class..same code working at my m/c on Wamp, but not working perfect at Dreamhost.com webserver

i have just encrypted a UserId controller and sending mail to client for activate account.
but when he is clicking ..on that link..that will not decoding in actual data..please solve this...

I have used key ...
UserId is auto numeber, BIGINT fields.like 1,2,3 and so on..
Code:
function sendActivationKey($userId){
    $encrypted_uid =$this->encrypt->encode($userId);
    $encrypted_uid =trim($encrypted_uid,'=');
    $this->load->library('email');
    $config['protocol'] = 'sendmail';
    $config['mailpath'] = '/usr/sbin/sendmail';
    $config['charset'] = 'iso-8859-1';
        $config['wordwrap'] = TRUE;
        $this->email->initialize($config);      
        $this->email->from("team mail", ' Team');                  
        $this->email->to($Email);          
        $this->email->subject('Activate your Account');
    $LinkSend=base_url()."mydomin/activate/".$encrypted_uid;// link send
    $this->email->message("Thank you ,please click on below link to activate your account \n ".$LinkSend);
    if($this->email->send()==1){
          return true;
        }

}
function activation(){
   $uid=$this->uri->segment(3);
   $userId=$this->encrypt->decode(uid]);  
   echo $userId;
}
Please solve my problem...Activation not again decoding correct value.

i have use trim function..for tralling "=" , which is coming after encoding a value.


Messages In This Thread
Please Solve My Encryption problem.. - by El Forum - 10-27-2007, 02:31 AM
Please Solve My Encryption problem.. - by El Forum - 10-27-2007, 07:42 AM
Please Solve My Encryption problem.. - by El Forum - 10-27-2007, 07:50 AM
Please Solve My Encryption problem.. - by El Forum - 10-27-2007, 01:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB