input: Write a function that creates a Flask application for submitting form data (Name, Email, Phone) and storing it in a SQLite database. If the form is successfully submitted and data is stored, it should return a redirect to the home page. Otherwise, it should render the home page with an error message.
  assert submit_form(name="John Doe", email="john@example.com", phone="1234567890")==redirect('/')
  assert submit_form(name="Jane Smith", email="jane@example.com", phone="0987654321")==redirect('/')
  assert submit_form(name="", email="invalid@example.com", phone="1112223333")==render_template('index.html', error="Invalid input")
output: 
  @app.route('/submit', methods=['POST'])
  def submit_form():
      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', error="Invalid input")
  
      conn = sqlite3.connect('database.db')
      cursor = conn.cursor()
      cursor.execute('''
          INSERT INTO users (name, email, phone)
          VALUES (?, ?, ?)
      ''', (name, email, phone))
      conn.commit()
      conn.close()
  
      return redirect('/')
  