public static boolean insert(String insertQuery){
        Statement stmt = null;
	int result = 0;
	try 
        {
            //connect to DB 
            currentCon = ConnectionManager.getConnection();
            stmt=currentCon.createStatement();
            result = stmt.executeUpdate(insertQuery);	        
            
            // if insertion fails
            if (result > 0){
                return true;
            } 
            //if insertion succeed thenreturn false
            else{
                System.out.println("Sorry, you are not a registered user! Please sign up first");
                return false;
            }
        }catch (Exception ex){
            System.out.println("Insertion into user_login table failed: An Exception has occurred! " + ex);
            return false;
        } 
        //some exception handling
        finally 
        {
            if (rs != null)	{
                try {
                rs.close();
                } catch (Exception e) {}
                rs = null;
                }

            if (stmt != null) {
                try {
                stmt.close();
                } catch (Exception e) {}
                stmt = null;
                }

            if (currentCon != null) {
                try {
                currentCon.close();
                } catch (Exception e) {
                }

                currentCon = null;
            }
        }
    }