I have little problems like this alot, most of the time it's caused by me staring at the code for too long.
you can't set any variable to a global variable like POST.. post is declared when people fill in a form element you can't change it with code.
Is invalid markup.. it wont work. POST globals are declared by forms.
so first of all you have to set the value you want to the session:
that is perfecly fine. You can declare and change the value of session variables.
but when you go to refer to the stored value you have to set it to a standard variable like:
you don't really need to do this.. its usually done for ease of use. You can refer to it in code using the long global name of $_SESSION['search'] every time you need it... but thats not very clean.
$cat = $_SESSION['search'];
then to pass that value to another dropdown element (which is what im guessing your trying to do) you would do this:
of course the form would have to be properly completed.
<option value=" ' . $cat .' ">' . $cat . '</option>
<option value="other value">Other Values</option>
But as you can see because the top option is set with the variable of what they selected it will carry over the info from the last page.
If this isn't what you were talking about let me know.
It was kinda hard to tell from you frantic "OMG why isn't it working" post