php - How to hide get parameter from url in codeigniter


I want to hide get parameter from url.

I have URL like

I want to remove ?clear=1 from URl and want to URL like:

it is possible in codeigniter but how ? i saw some similar question here but i can't found proper solution.




This is not possible to hide the get parameter. You can use ajax to send the parameter like this

        var id = "your parameter which you want to send in the url";
            url:"<?php echo site_url('controller/function');?>/"+id,



Try this for more link




You can usebase64_encode before send data and when you catch that in Controllerbase64_decode

Examples of Encoding & Decoding Encrypted PHP

In View

<a href="<?php echo base_url()?>Controller_name/Method/<?php base64_encode('Im the value')?>"

In Controller

public function Method($id)
   $valid_id = base64_decode($id);

People are also looking for solutions to the problem: php - Imagick:UnableToLoadModule


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.