Passing variable by $ _POST

1

I have the following foreach()

    <? foreach($cidades as $valor){ ?>
    <div class="listacidade"><a href="<? echo base_url("cidade/".$valor->idParametro."-".url_title($valor->parametro)); ?>"><img src="<? echo base_url(); ?>site/modules/entrada/images/<?=url_title($valor->parametro);?>.jpg" width="250" height="120" alt=""/></a></div>
    <? } ?>

In it I already do the normal database query and view according to the city listing, but I need to click on one of the cities so that I can pass idParametro in some way, it can be in $_POST or $_SESSION ... I just do not want it to appear then in URL .

I thought of using city / name-codcity but it does not work, because of the module, then I would have to create a module for each city.

Passing only id would already be good.

    
asked by anonymous 03.08.2015 / 23:10

1 answer

0

You can change this DIV by an option select, put it inside a form and in the value of select, you put the IdParametro and send the data in the submit with the post method. It's one of the solutions.

    
03.08.2015 / 23:22