input: Write a function to create an application using Python and Flask to submit form data and store it in a database. The form elements include Name, Email, and Phone. The function should return the Flask application object.
  
  app = create_flask_app()
  
  assert app.config['ENV'] == 'production'
  assert app.url_map.bind('localhost').match('/') == ('home', {})
  assert app.url_map.bind('localhost').match('/submit', 'POST') == ('submit', {'methods': ['POST']})
  assert app.config['DEBUG'] == False
output: from flask import Flask, request, render_template
  import sqlite3
  
  def create_flask_app():
      app = Flask(__name__)
      app.config['ENV'] = 'production'
      app.config['DEBUG'] = False
  
      @app.route('/')
      def home():
          return render_template('form.html')
  
      @app.route('/submit', methods=['POST'])
      def submit():
          name = request.form['Name']
          email = request.form['Email']
          phone = request.form['Phone']
          
          conn = sqlite3.connect('database.db')
          cursor = conn.cursor()
          cursor.execute('''CREATE TABLE IF NOT EXISTS users (name TEXT, email TEXT, phone TEXT)''')
          cursor.execute('''INSERT INTO users (name, email, phone) VALUES (?, ?, ?)''', (name, email, phone))
          conn.commit()
          conn.close()
          
          return "Form submitted successfully!"
  
      return app