code simplified

git-svn-id: http://piwigo.org/svn/branches/release-1_3@309 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
z0rglub
2004-01-21 23:25:20 +00:00
parent 54813d73b0
commit 36bf4efe4d
+3 -4
View File
@@ -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 );