0

I've seen questions around both submitting to self (same url) and submitting to different url. Which one is the right way to go?

user823447
  • 147
  • 2
  • 11

1 Answers1

1

Neither is "right". Both are fine. Use whichever one suits your needs.

Submitting to a different URL can simplify keeping your "show form" and "process submission" logic separate (and thus easier to maintain).

Submitting to the same URL simplifies redisplaying the form with error messages if the user makes an error in their input.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335