Aqui te dejo un minicodigo que he hecho para ti, espero que te sea de ayuda.
Código PHP:
<?
//Inicio de sesion Básico
session_save_path($_SERVER['DOCUMENT_ROOT'].'/recicla');
session_start();
define('MAX_IDLE_TIME', 3);
if (isset($_POST['cmdEnviar'])){ //Copruebas que se ha ejecutado el boton (tb puedes comprobar si los campos se han rellenado)
$_SESSION['txtNombre']=$_POST['txtNombre'];
$_SESSION['txtApellidos']=$_POST['txtApellidos'];
echo "variables de sesion establecidas"; //Es solo para que tu compruebes que las variables han sido establecidas
}
?>
<head>
<title>Variables de sesion para Faser</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<table width="200" border="0" align="center">
<tr>
<td align="center"><label>Nombre:</label><input name="txtNombre" type="text" value="<? echo $_SESSION['txtNombre']; // colocas en el value la variable de sesion?>"/></td>
</tr>
<tr>
<td align="center"><label>Apellidos:</label><input name="txtApellidos" type="text" value="<? echo $_SESSION['txtApellidos']; ?>"/></td>
</tr>
<tr>
<td align="center"><input name="cmdEnviar" type="submit" value="Enviar"/></td>
</tr>
</table>
</form>
<? session_destroy(); //Funcion que destruye las variables, tu ya ves si te conviene o no?>
</body>
</html>