2
I’m working on a system that has a general search filter on the home screen. For this, in my header I put a select/combo box and a button 'OK'.
To treat this I decided to use Sesssions, where I can store the value that the guy chose and use on all the necessary pages. It’s just that this Miss is having a problem.
-Every time he goes to some other page, Session looks like Zera and I don’t have the information anymore:
session_start();
$geral = $_GET['slcGeral'];
$_SESSION['Geral'] = $geral;
-To test I passed the direct value and so works normal:
session_start();
$geral = 1;
$_SESSION['Geral'] = $geral;
What can it be?
Where are those codes you put in the question? You have no idea how you are using either the session or keeping the values the way you have expressed them. Try [Dit] the question so that it becomes self-sufficient with the details provided, to increase the chance of having an answer that solves your problem. Suggested reading: [Ask]
– Bacco
First check if a get this set, only then set the Session.
– Jader A. Wagner
an isset would settle quietly
– Ríder Cantuária