Answers.Body: <p><a href="https://craftcms.com/classreference/services/HttpRequestService" rel="noreferrer">HttpRequestService</a>'s <a href="https://craftcms.com/classreference/services/HttpRequestService#getPost-detail" rel="noreferrer">getPost</a> is what you're looking for:</p>
  
  <pre><code>$value = craft()-&gt;request-&gt;getPost('dataName');
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-16T07:55:38.010Z
Answers.Text: Or you can get all the POST data in one go with
  
  `$vars = craft()->request->getPost();`
Answers.UserDisplayName: Jeremy Daalder
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-16T07:56:56.077Z
Answers.Text: You may also want to look at https://github.com/bossanova808/CommerceMailer for some stuff to get you started in this area...
Answers.UserDisplayName: Jeremy Daalder
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-15T18:06:25.947Z
Answers.LastActivityDate: 2016-07-15T18:06:25.947Z
Answers.UserDisplayName: Brad Bell
Answers.Body: <p>In CraftCMS 3.x <code>craft.app.request.getBodyParam('dataName')</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-18T07:45:40.667Z
Answers.LastActivityDate: 2021-05-18T07:45:40.667Z
Answers.UserDisplayName: Yurii Kosiak
Body: <p>I am trying to create a plugin that takes the POST data from an order and emails it to the end user. Which property should I use to do this? I've already tried to use <code>getContent()</code> and <code>getContentFromPost()</code>.</p>
  
  <p>So for example if I have </p>
  
  <pre><code>         &lt;input type="text" name="dataName" value=""&gt;
  </code></pre>
  
  <p>And in my plugin I'm trying to get the value of "dataName" which property should I use?</p>
  
Tags: <plugin-craftcommerce>
Title: Getting Information from POST data
ThreadText: # Getting Information from POST data
  
  (Asked by: username_0 on 2016-07-15)
  
  I am trying to create a plugin that takes the POST data from an order and emails it to the end user. Which property should I use to do this? I've already tried to use `getContent()` and `getContentFromPost()`.
  
  So for example if I have
  
  ```
           <input type="text" name="dataName" value="">
  
  ```
  
  And in my plugin I'm trying to get the value of "dataName" which property should I use?
  
  **Tags:** plugin-craftcommerce
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-07-15. Score: 5
  
  [HttpRequestService](https://craftcms.com/classreference/services/HttpRequestService)'s [getPost](https://craftcms.com/classreference/services/HttpRequestService#getPost-detail) is what you're looking for:
  
  ```
  $value = craft()->request->getPost('dataName');
  
  ```
  
  > **Comments:**
  > **username_2**: Or you can get all the POST data in one go with  `$vars = craft()->request->getPost();`  
  > **username_2**: You may also want to look at https://github.com/bossanova808/CommerceMailer for some stuff to get you started in this area...  
  
  ---
  
  ### Answer by username_3 on 2021-05-18. Score: 2
  
  In CraftCMS 3.x `craft.app.request.getBodyParam('dataName')`
  
  
  ---
  
  