title: Best practices for Post-Redirect-Get (PRG) with MVC in PHP
body: <p>Is there any best practice for PRG pattern with MVC? <br>
  In this tutorial:<br>
  <a href="http://www.theserverside.com/news/1365146/Redirect-After-Post">http://www.theserverside.com/news/1365146/Redirect-After-Post</a> <br>
  the proposed solution requires 4 actions: <br>
  <b>Create_Item</b> (POST) => "resets" the form and redirects to Display_Item<br>
  <b>Display_Item</b> (GET) => shows the form (with temp data and errors if exists) <br>
  <b>Store_Item</b> (POST) => try to save data to DB, if errors, save errors and redirect to Display_Item, if success redirect to Display_Stored<br>
  <b>Display_Stored</b> (GET) => shows the item created or a success message, tec. <br>
  <br>
  Now, I think that to have the first action with POST is a problem, because we can't start the form with a link. Using GET in <i>Create_Item</i> seems a better option.
  <br>
  And also, we can do the same with 3 actions (using the same action for Create_Item and Display_Item, but with an extra <i>flag</i> for reseting the form, for example:<br>
  <a href="http://www.example.com/controller/Create_Item/?reset=1">http://www.example.com/controller/Create_Item/?reset=1</a> <br>
  <br>
  And also we can do the same with just 2 actions, because we can use an if inside <i>Create_Item</i> for checking if the request is GET or POST (so we are combining Display_Item with Store_Item).<br>
  <br>
  And also we can do the same with just 1 action, because we can have an extra flag (in the URL query or in a session) for showing the results instead of the form:<br>
  GET <a href="http://www.example.com/controller/Create_Item/?reset=1">http://www.example.com/controller/Create_Item/?reset=1</a>  => shows a new form and redirects to the next URL <br>
  GET <a href="http://www.example.com/controller/Create_Item/">http://www.example.com/controller/Create_Item/</a> => shows a form with temp data and errors if exists <br>
  POST <a href="http://www.example.com/controller/Create_Item/">http://www.example.com/controller/Create_Item/</a> => save errors in temp, or data in DB (and set a session flag for success) and redirects to above URL or next URL <br>
  GET <a href="http://www.example.com/controller/Create_Item/">http://www.example.com/controller/Create_Item/</a> => if $_SESSION['success'] show results<br>
  <br>
  Personally I like the idea of having 4 actions, but I don't have any real advantage over the others options. But I don't feel secure choosing my design without a real criteria.<br>
  Does somebody know the <b>PROS</b> and <b>CONS</b> of each design (if any)? 
  <br><br>
  For example, I see the 4 actions cleaner, but if we want to change how the temp data is saved, we need to change it in 4 places.<br>
  <br>
  Thanks!</p>