function modificaCliente($cod, $cod2, $nome, $data, $email, $telefono, $username, $password)
 {
     $cliente = new Utente();
     if ($cod == "" || $cod2 == "" || $nome == "" || $data == "" || $email == "" || $telefono == "" || $username == "" || $password == "") {
         return null;
     }
     $query = "SELECT * FROM utente WHERE codiceFiscale='{$cod}' and tipo='cliente'";
     $this->database->query($query);
     $res = $this->database->result;
     $riga = mysql_fetch_array($res);
     if (isset($riga[0])) {
         $cliente->setCodice($cod2);
         $cliente->setNome($nome);
         $cliente->setDataNascita($data);
         $cliente->setEmail($email);
         $cliente->setTelefono($telefono);
         $cliente->setUsername($username);
         $cliente->setPassword($password);
         $cliente->setTipo("cliente");
         $cliente->update($cod);
         return $cliente;
     } else {
         return null;
     }
 }