input: Write a function to create a Python Flask application that accepts form data for Name, Email, and Phone, and stores this data in a SQLite database named 'data.db'. The application should render an index.html page and redirect to the main page after submission. If the data insertion is successful, return True; otherwise, return False.
  assert submit_form("John", "john@example.com", "123-456-7890")==True
  assert submit_form("Jane", "jane@example.com", "987-654-3210")==True
  assert submit_form("", "invalid@example.com", "111-222-3333")==False
  assert submit_form("Alice", "alice@example.com", "")==False
  assert submit_form("Bob", "", "444-555-6666")==False
output: 
  def submit_form(name, email, phone):
      from flask import Flask, request, redirect, render_template
      import sqlite3
  
      app = Flask(__name__)
  
      @app.route('/', methods=['GET', 'POST'])
      def index():
          if request.method == 'POST':
              name = request.form['name']
              email = request.form['email']
              phone = request.form['phone']
              if not name or not email or not phone:
                  return render_template('index.html'), 400
              conn = sqlite3.connect('data.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 redirect('/'), 200
          return render_template('index.html')
  
      app.run(debug=True)
      return True
  