You could always use a session to store the selected choices. something like
<? session_start();
// reset the answers if not been here before or if the new flag is set.
if ( !isset($gone) || $new == 1 )
{
session_register('gone');
session_register('left');
session_register('new');
$gone=array(0, 0, 0, 0, 0, 0, 0, 0, 0);
$left=5;
$new=0;
}
?>
<HEAD>
</HEAD>
<BODY>
<? if ( $action != "Y" ) { ?>
<FORM action="<? echo $PHP_SELF; ?>" method="post">
<INPUT type="hidden" name="action" value="Y">
Select your option.
<P>
<?
for ( $loop=1; $loop<6; $loop++ )
{
if ( $gone[$loop] != 1 )
{
echo "<INPUT type=\"radio\" name=\"picked\" value=\"".$loop."\">".$loop."<BR>\n";
}
}
?>
<P>
<INPUT type="submit" value="Submit">
<INPUT type="reset" value="Reset">
</FORM>
<?
}
else
{
$ans=1;
if ( $ans == $picked )
{
session_unregister($gone);
session_unregister($left);
session_destroy();
unset($gone);
unset($left);
header("location: ".$PHP_SELF);
exit;
}
else
{
unset($action);
$gone[$picked]=1;
$left--;
if ( $left < 3 )
{
echo "Only 2 answers left";
$new=1;
}
header("location: ".$PHP_SELF);
exit;
}
}
?>
</BODY>
The above code is very basic but it does what I understand that you want.
Mark.