Frage

It is the first time I want to use encrypt class.I need to encrypt a value from view and send it as a parameter of a function in controller.In controller I do this:

$this->load->library('encrypt');   

in view I have this link:

<a href="<?php echo base_url()?>/article_cont/show_public/<?php $this->encrypt->encode($row->art_id)?>">continue</a>     

when I click on this link it goes to show_public function in controller but does not pass the parameter to this function.what is the problem?
Thanks for your help.

War es hilfreich?

Lösung

You forget to print it out.

Just:

<a href="<?php echo base_url()?>/article_cont/show_public/<?php echo $this->encrypt->encode($row->art_id)?>">continue</a>

Changed:

<?php echo $this->encrypt->encode($row->art_id)?>

Add 'echo' to it.

I think it will work.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top