From c2fe5824a6404ed4936bb66013c79ee40c4a72ff Mon Sep 17 00:00:00 2001 From: z0rglub Date: Thu, 11 Sep 2003 20:22:35 +0000 Subject: Bug correction : errors were not shown git-svn-id: http://piwigo.org/svn/trunk@87 68402e56-0260-453c-a942-63ccdbb3a9ee --- identification.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'identification.php') diff --git a/identification.php b/identification.php index 9d699a1a3..a44cc8917 100644 --- a/identification.php +++ b/identification.php @@ -24,9 +24,9 @@ $errors = array(); if ( isset( $_POST['login'] ) ) { // retrieving the encrypted password of the login submitted - $query = 'select password'; - $query.= ' from '.PREFIX_TABLE.'users'; - $query.= " where username = '".$_POST['login']."';"; + $query = 'SELECT password'; + $query.= ' FROM '.PREFIX_TABLE.'users'; + $query.= " WHERE username = '".$_POST['login']."';"; $row = mysql_fetch_array( mysql_query( $query ) ); if( $row['password'] == md5( $_POST['pass'] ) ) { @@ -61,7 +61,7 @@ $vtp->setGlobalVar( $handle, 'mail_webmaster', $conf['mail_webmaster'] ); $vtp->setGlobalVar( $handle, 'user_template', $user['template'] ); initialize_template(); //-------------------------------------------------------------- errors display -if ( sizeof( $error ) != 0 ) +if ( sizeof( $errors ) != 0 ) { $vtp->addSession( $handle, 'errors' ); foreach ( $errors as $error ) { -- cgit v1.2.3