Thanks, that worked.

So I understand this better did this 
($_POST[firstname][$key] = trim($_POST[firstname][$key]);)

not work because the variable to the left of the '=' was no longer POSTed?


---- Original Message ----
Remove $_POST from $_POST[firstname][$key], $_POST[middlename][$key] and
$_POST[lastname][$key]. 

It should simply be $firstname[$key], $middlename[$key], and $lastname[$key]

Not sure what your array data looks like but instead of using while() use
foreach():

foreach($_POST['firstname'] as $key => $value){
        $firstname[$key] = trim($_POST[firstname][$key]);
        $middlename[$key] = trim($_POST[middlename][$key]);
        $lastname[$key] = trim($_POST[lastname][$key]);
}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to