input: Write a function to create an application using Python and Flask that allows users to submit form data (Name, Email, Phone) and stores it in a SQLite database. Include function that handles the form submission and saves the data.
  assert submit()
output: 
  def submit():
      from flask import Flask, request, 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']
  
              conn = sqlite3.connect('data.db')
              cursor = conn.cursor()
              cursor.execute('''
                  CREATE TABLE IF NOT EXISTS users (
                      id INTEGER PRIMARY KEY AUTOINCREMENT,
                      name TEXT NOT NULL,
                      email TEXT NOT NULL,
                      phone TEXT NOT NULL
                  )
              ''')
              cursor.execute('INSERT INTO users (name, email, phone) VALUES (?, ?, ?)', (name, email, phone))
              conn.commit()
              conn.close()
  
              return 'Data submitted successfully!'
  
          return render_template('form.html')
  
      if __name__ == '__main__':
          app.run(debug=True)
  