Only store the session variable value IF the posted value exists:
@session_start();
if (isset($_POST['postval'])) {
$_SESSION['postval'] = $_POST['postval'];
}
That way it will reset the session variable if there is a value posted to it and won't touch the existing one if you return to the page without the post.