<?php
$select = array(1=>'',2=>'');
if(isset($_POST['select'])) {
setcookie("select",(int)$_POST['select']);
$select[(int)$_POST['select']] = 'selected';
} elseif(isset($_COOKIE["select"])) {
$select[(int)$_COOKIE["select"]] = 'selected';
}
?>
<form method="post">
<select name="select" onchange="this.form.submit()">
<option value="1" <?=$select[1]?>>1</option>
<option value="2" <?=$select[2]?>>2</option>
</select>
</form>