title: How to pass double value from HTML to PHP
body: <p>I want to pass a <strong><code>Double</code></strong> value (<code>i.e. 10.9</code>) from an HTML file to PHP. Here is my HTML code:</p>
  
  <pre><code>        &lt;form action="AddProduct.php" method="POST" target="_self"&gt;
              &lt;table&gt;
                  &lt;tr&gt;
                      &lt;label class="lbl"&gt; Title: &lt;/label&gt; &amp;nbsp
                      &lt;input class="form-control" type="text" name="title" maxlength="100" size=20&gt;
                      &lt;label class="lbl"&gt; Price: &lt;/label&gt; &amp;nbsp &amp;nbsp
                      &lt;input class="form-control" type="text" name="price" maxlength=100&gt;
                  &lt;/tr&gt;
                  &lt;br&gt;
                  &lt;tr&gt;
                      &lt;label class="lbl"&gt; Description: &lt;/label&gt; &amp;nbsp &lt;br&gt;
                      &lt;textarea rows="10" cols="37" name="description"&gt;&lt;/textarea&gt;
                  &lt;/tr&gt;
                  &lt;br&gt;
                  &lt;tr&gt;
                      &lt;input class="btn" type="Submit" name="save" value="Save"&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/form&gt;
  </code></pre>
  
  <p>And here is my PHP code:</p>
  
  <pre><code>require __DIR__.'/../vendor/autoload.php';
  
  $config = require __DIR__.'/../configuration.php';
  
  use \DTS\eBaySDK\Constants;
  use \DTS\eBaySDK\Trading\Services;
  use \DTS\eBaySDK\Trading\Types;
  use \DTS\eBaySDK\Trading\Enums;
  
  $siteId = Constants\SiteIds::US;
  
  $service = new Services\TradingService(array(
      'apiVersion' =&gt; $config['tradingApiVersion'],
      'sandbox' =&gt; true,
      'siteId' =&gt; $siteId,
      'authToken' =&gt; $config['sandbox']['userToken'],
      'devId' =&gt; $config['sandbox']['devId'],
      'appId' =&gt; $config['sandbox']['appId'],
      'certId' =&gt; $config['sandbox']['certId'],
  ));
  
  $request = new Types\AddFixedPriceItemRequestType();
  
  $request-&gt;RequesterCredentials = new Types\CustomSecurityHeaderType();
  $request-&gt;RequesterCredentials-&gt;eBayAuthToken = $config['sandbox']['userToken'];
  
  $item = new Types\ItemType();
  
  $item-&gt;Title = urlencode($_POST['title']);
  $item-&gt;Description = urlencode($_POST['description']);
  
  $item-&gt;StartPrice = new Types\AmountType(array('value' =&gt; urlencode($_POST['price'])));
  
  $request-&gt;Item = $item;
  
  $response = $service-&gt;addFixedPriceItem($request);
  
  if (isset($response-&gt;Errors)) {
      foreach ($response-&gt;Errors as $error) {
          printf("%s: %s\n%s\n\n",
              $error-&gt;SeverityCode === Enums\SeverityCodeType::C_ERROR ? 'Error' : 'Warning',
          $error-&gt;ShortMessage,
          $error-&gt;LongMessage
          );
      }
  }
  
  if ($response-&gt;Ack !== 'Failure') {
      printf("The item was listed to the eBay Sandbox with the Item number %s\n",
          $response-&gt;ItemID
      );
  }
  </code></pre>
  
  <blockquote>
    <p><strong>Fatal error:</strong> Uncaught exception 'DTS\eBaySDK\Exceptions\InvalidPropertyTypeException' with message
    'Invalid property type: DTS\eBaySDK\Trading\Types\AmountType::value
    expected , got ' in
    /var/www/html/gitsamp/ebay-sdk-examples/vendor/dts/ebay-sdk/src/DTS/eBaySDK/Types/BaseType.php:433
    Stack trace: #0
    /var/www/html/gitsamp/ebay-sdk-examples/vendor/dts/ebay-sdk/src/DTS/eBaySDK/Types/BaseType.php(263): DTS\eBaySDK\Types\BaseType::ensurePropertyType('DTS\eBaySDK\Typ...',
    'value', '16.99') #1
    /var/www/html/gitsamp/ebay-sdk-examples/vendor/dts/ebay-sdk/src/DTS/eBaySDK/Types/BaseType.php(231): DTS\eBaySDK\Types\BaseType->set('DTS\eBaySDK\Typ...', 'value',
    '16.99') #2
    /var/www/html/gitsamp/ebay-sdk-examples/vendor/dts/ebay-sdk/src/DTS/eBaySDK/Types/DoubleType.php(51):
    DTS\eBaySDK\Types\BaseType->setValues('DTS\eBaySDK\Typ...', Array) #3
    /var/www/html/gitsamp/ebay-sdk-examples/vendor/dts/ebay-sdk-trading/src/DTS/eBaySDK/Trading/Types/AmountType.php(49):
    DTS\eBaySDK\Types\DoubleType->__construct(Array) #4 /var/www/h in
    /var/www/html/gitsamp/ebay-sdk-examples/vendor/dts/ebay-sdk/src/DTS/eBaySDK/Types/BaseType.php
    on line 433</p>
  </blockquote>