<?php
$people 
= array();
$number 10;

if ( isset(
$_COOKIE['teaCookie']) ) {
    
$people unserialize(stripcslashes($_COOKIE["teaCookie"]));
}

if ( isset(
$_GET['people']) ) {
    
$people $_GET['people'];
    
setcookie("teaCookie"serialize($people));
}
?>
<form method="get" action="">
<?php
for ( $i=$i<$number $i++ ) {
    if ( isset(
$people[$i]) ) {
        echo 
'<input type="text" name="people[]" value="'.$people[$i].'" /><br />';        
    } else {
        echo 
'<input type="text" name="people[]" value="" /><br />';    
    }
}
?>
<input type="submit" value="Save &amp; Run" name="submit" />
</form>
<?php
if ( isset($_COOKIE['teaCookie']) || isset($_GET['people']) ) { 
    
?><p><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Pick Again!</a></p><?php
}
?>
<?php
$who 
array_rand(array_filter($people));
if ( 
$who >= ) {
    
$teaMaker $people[$who];
    echo 
'<p>'.$teaMaker.' will be making the tea!</p>';
}
?>