I made a Joomla module which contains a form element select box. On selecting, it submits the form and the value of selected item is stored in a session variable.

```
<?php
defined('_JEXEC') or die;

$session = JFactory::getSession();

if (isset($_POST["country"])){

$session->set('cont', $_POST["country"]);

}

?>

<div id="dropdown">
<form action="" method="post" name="country"><label for="country"></label>
<select id="country" name="country" onchange="this.form.submit()">

<?php

    $rows = Array('UAE', 'KSA', 'OMAN');

foreach($rows as $row){ 

    if($row == $session->get('cont')){ 

        $isSelected = ' selected="selected"'; 
    } 
    else { 
        $isSelected = ''; 
    } 

    echo "<option ".$isSelected.">".$row."</option>";
    }
?>

</select>
</form>
</div>

```

and in K2 item page the code is 

```
<?php

                    if($session->get('cont') == "KSA"){

                    echo "SR-".number_format($this->item->ksaprice);

                    }elseif($session->get('cont') == "OMAN"){

                    echo "OMR-".number_format($this->item->omanprice);

                    }else

                    echo "AED-".number_format($this->item->uaeprice);

            ?>

```

Now the problem is when I select a country, page reloads, the session is created successfully but the price doesn't change as the page needs to be refreshed again to get the session's value. 

I need to change the price without refreshing the page again.