Encrypt parameter in link

Asked

Viewed 34 times

0

I’m trying to encrypt a past parameter But it’s not working

What I want to encrypt is $cc['CODIGO']

 <?php echo anchor('financeiro/edicao/'.$cc['CODIGO'], 
 '<span class="fa fa-pencil"></span>', 
 array('class' => 'btn btn-success')); ?>

Is there any way to encrypt, that is not in disuse, to send as parameter in the link?

  • Blza, I’ll edit my question

  • Have you tried using the library Encryption?

  • So, in my research I found it, but isn’t it just used in the controller? I need to use in the view, if I am going to use in the view I would have to give a extends and I’d be a little weird, or I’m wrong?

  • It’s safe for me to use session in that case?

  • Why use in view?

  • Because clicking on the link brings me to the controller and the value is already appearing in the url. I believe I need to encrypt in the view

  • And why no longer generates value in controller that will serve the view?

  • It is a code that is inside an array, returned from a controller, I thought it would be simpler to encrypt in the view

Show 3 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.