if (!$mailToAddr) {
         echo "<script language='javascript'>";
         echo "alert('You didn\\'t enter an email address when registering with Mapbender. Unfortunately there is no way to send you a new password.');";
         echo "window.back();";
         echo "</script>";
     } elseif ($user_id) {
         if ($admin->sendEmail("", "", $mailToAddr, $mailToName, "Your new Mapbender password", "login:    "******"\npassword: "******"UPDATE mb_user SET mb_user_password = \$1";
             $sql_update .= " WHERE mb_user_id = \$2";
             #echo $sql_update;
             $v = array(md5($sql_password), $user_id);
             $t = array('s', 'i');
             db_prep_query($sql_update, $v, $t);
             //reset login count
             $admin->resetLoginCount($user_id);
             echo "<script language='javascript'>";
             echo "alert('A new password will be sent to your e-mail-address!');";
             echo "window.close();";
             echo "</script>";
         } else {
             echo "<script language='javascript'>";
             echo "alert('An error occured while sending the new password to your e-mail-address! " . $error_msg . " Please try again later.');";
             echo "window.back();";
             echo "</script>";
         }
     }
     $upd = false;
 } else {
     /*HTML*****************************************************************************************************/
     echo "<fieldset><legend>Forgot your Passwort ?</legend>";