Anyone know how to get a session var. from a while loop.
Here is some code:

<form id="form1" name="form1" method="post" action="">
        <select name="age" id="age">
        <option value="0">Select Age</option>
  echo '<option value="1">'.$i.'</option>';

It's from a drop down menu.
Here is the code for the session var I want to create:

if ($_POST && !empty($_POST['age'])) {
		echo $_SESSION['age'] = $_POST['age'];

Any help would be great!

Why not just echo out $_POST as that is all you are trying to do anyway. Otherwise, if you want to store the age in a session, you need to allocate your posted age to a session variable and to do that you need to do:

$_SESSION['age'] = $_POST['age'];
echo $_SESION['age'];

Thanks for reply's!
Got it to work!