Contact page MVC workflow

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-09-22T05:28:24Z Indexed on 2011/03/14 0:09 UTC
Read the original article Hit count: 153

Filed under:
|

All my previous projects have had this workflow on Contact pages

  1. User submits form
  2. Controller gets $_POST details
  3. Controller validates details (and sets error messages if necessary)
  4. Controller sends email
  5. Controller redirects to thanks page

Is this the standard workflow?

I used to validate everything in controllers, and then did some more reading and they recommended against it. Therefore, should I send the $_POST details to a helper type object and let it do all the work (validation/sending)?

© Stack Overflow or respective owner

Related posts about php

Related posts about mvc