input: Write a function to create a Flask application that allows users to submit form data containing name, email, and phone information, and stores the data in an SQLite database. If the data is successfully stored, redirect the user back to the home page. If the database insertion fails, return an error message.
  assert submit() == redirect('/')
  assert submit() == redirect('/')
  assert submit() == "Error: Failed to insert data into database"
  assert submit() == redirect('/')
  assert submit() == redirect('/')
output: 
  @app.route('/submit', methods=['POST'])
  def submit():
      try:
          name = request.form['name']
          email = request.form['email']
          phone = request.form['phone']
          conn = sqlite3.connect('data.db')
          cursor = conn.cursor()
          cursor.execute('INSERT INTO users (name, email, phone) VALUES (?, ?, ?)', (name, email, phone))
          conn.commit()
          conn.close()
          return redirect('/')
      except Exception as e:
          return "Error: Failed to insert data into database"
  