<?php
if (isset($_POST['selct'])) {
setcookie('cityname',$_POST['selct']);
header("Refresh:0");
}
if(isset($_COOKIE['cityname'])){
$cityname = $_COOKIE['cityname'];
}else{
$cityname = "1";
}
?>
<form method="post">
<select name="selct" onChange="this.form.submit()">
<option value="1" <?=$_COOKIE['cityname'] == "1" ? "selected" : ""?>>1</option>
<option value="2" <?=$_COOKIE['cityname'] == "2" ? "selected" : ""?>>2</option>
</select>
</form>