input: Write a function named submit_form that takes form input data including Name, Email, and Phone. The function should connect to a SQLite database, insert the form data into a table named 'data', and then return a redirect back to the home page. If the connection to the database fails, the function should return an error message indicating the failure.
  assert submit_form('John Doe', 'john@example.com', '1234567890')==redirect('/')
  assert submit_form('Jane Smith', 'jane@example.com', '9876543210')==redirect('/')
  assert submit_form('', 'invalid@example.com', '0000000000')==redirect('/')
  assert submit_form('Invalid User', '', '0000000000')==redirect('/')
  assert submit_form('Invalid User', 'invalid@example.com', '')==redirect('/')
output: try:
      conn = sqlite3.connect('database.db')
      cursor = conn.cursor()
      cursor.execute("INSERT INTO data (Name, Email, Phone) VALUES (?, ?, ?)", (Name, Email, Phone))
      conn.commit()
      conn.close()
      return redirect('/')
  except Exception as e:
      return str(e)