Session on select

-2

select is being loaded by $view->montarComboAreasNoticia() , what I'm wanting is that I create a session to save the option I chose when I go back to the select selection page.

Code :

<select name="FArea" id="select2">
          <option value="0">
                   <?=translate("Todas")?>
          </option>
          <?$view->montarComboAreasNoticia(); ?>
</select>'
    
asked by anonymous 21.04.2016 / 16:16

1 answer

1

Just open the session on all the pages you want to remove the information:

session_start();

And assign the value in the session variable:

$_SESSION['opcao'] = $opcao
    
26.04.2016 / 05:50