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
$_
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
> while (list ($key, $val) = each ($_POST[firstname])){
> $_POST[firstname][$key] = trim($_POST[firstname][$key]);
> $_POST[middlename][$key] = trim($_POST[middlename][$key]);
> $_POST[lastname][$key] = trim($_POST[lastname][$key]);
you might be able to get this one yoursel
3 matches
Mail list logo