Answers.Body: <p>You'd do this wiht a Craft plugin or module.</p>
  
  <p>Try giving the plugin docs a once over: <a href="https://docs.craftcms.com/v3/extend" rel="nofollow noreferrer">https://docs.craftcms.com/v3/extend</a> and if you have some specific questions, feel free to post back.</p>
  
  <p>You can also generate Craft plugin boilerplate code at <a href="https://pluginfactory.io" rel="nofollow noreferrer">https://pluginfactory.io</a> that already has a lot of this setup for you.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-27T05:05:08.037Z
Answers.Text: i never thought my quetsion would get answered ,thanx a lot man...btw i already knew that much.
Answers.UserDisplayName: jamesSeb
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-25T22:39:40.543Z
Answers.LastActivityDate: 2020-03-25T22:39:40.543Z
Answers.UserDisplayName: Brad Bell
Body: <p>where do you handle the POST requests?
  where do you write the validation rules and flash error messages?
  where do you write save to db code?
  (mainly i want to know how do you route a POST request to a controller and where do you write the controller?)</p>
  
Tags: <form><controller>
Title: How to save data from a form in Craft? Explain with an example?
ThreadText: # How to save data from a form in Craft? Explain with an example?
  
  (Asked by: username_0 on 2020-03-25)
  
  where do you handle the POST requests?
  where do you write the validation rules and flash error messages?
  where do you write save to db code?
  (mainly i want to know how do you route a POST request to a controller and where do you write the controller?)
  
  **Tags:** form, controller
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-03-25. Score: 1
  
  You'd do this wiht a Craft plugin or module.
  
  Try giving the plugin docs a once over: <https://docs.craftcms.com/v3/extend> and if you have some specific questions, feel free to post back.
  
  You can also generate Craft plugin boilerplate code at <https://pluginfactory.io> that already has a lot of this setup for you.
  
  > **Comments:**
  > **username_0**: i never thought my quetsion would get answered ,thanx a lot man...btw i already knew that much.  
  
  ---
  
  