diff options
Diffstat (limited to '')
-rw-r--r-- | include/functions_user.inc.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index c623cf0c7..95ca7bb3c 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -102,11 +102,10 @@ function register_user( $login, $password, $password_conf, if ( $mail_address != '' ) $query.= ",'".$mail_address."'"; else $query.= ',NULL'; $query.= ",'".$status."'"; - for ( $i = 0; $i < sizeof( $infos ); $i++ ) - { + foreach ( $infos as $info ) { $query.= ','; - if ( $row[$infos[$i]] == '' ) $query.= 'NULL'; - else $query.= "'".$row[$infos[$i]]."'"; + if ( !isset( $row[$info] ) ) $query.= 'NULL'; + else $query.= "'".$row[$info]."'"; } $query.= ');'; mysql_query( $query ); |