Codice PHP:
<form name="info" method="post" action="?action=insert_2&mode=send">

<?
  $s    
mysql_query("select * from t_temp, t_utenti where cod_poID = " $poID " and cod_userID = userID ");
  
//La query non fa altro che selezionarmi gli utenti che ho deciso di selezionare nello step1

  
while($r msql_fetch_assoc($s)){
?>
  Email: <input type="text" name="email[]" value="<? echo $r["email"]; ?>" />
  Username: <input type="text" name="username[]" value="<? echo $r["username"]; ?>" />
<input type="hidden" name="userID[]" value="<? echo $r["userID"]; ?>" />
<?
}
?>
<input type="submit" name="invia" value="invia" />
</form>
e sul server:
Codice PHP:
    $email $_POST['email'];
    
$id $_POST['userid'];
    
$username  $_POST['username'];
    
    
$i 0;
    foreach(
$id as $key => $value) {
        
$array[] = array('id' => $value'email' => $email[$i], 'username' => $username[$i]);
        
$i++;
    } 
Crea un array del tipo
codice:
Array[n] (
  'id'
  'username'
  'emai');