title: Silex basic form submission
body: <p>I am trying to add a payment gateway to my site. I am having a lot of trouble with the basic implementation of the Silex framework. The <code>app.php</code> page is never found. In fact, I am currently using a testing server and while the <code>signup.php</code> page is in the following directory:</p>
  
  <p><code>http://localhost/www/smafo/signup.php</code>,</p>
  
  <p>submitting the form ends up resulting in the following url <code>http://localhost/create_transaction</code> which results in a page not found error.</p>
  
  <p><strong>Note:</strong> Changing the form's action attribute to <code>app.php</code>, routes to the correct <code>app.php</code> page and results in a Symfony Page not found error.</p>
  
  <p>Any ideas what I am doing wrong here? </p>
  
  <p>This is the sample form: <code>signup.php</code></p>
  
  <pre><code>&lt;form action="/create_transaction" method="POST" id="braintree-payment-form"&gt;
       &lt;p&gt;
         &lt;label&gt;Card Number&lt;/label&gt;
         &lt;input type="text" size="20" autocomplete="off" data-encrypted-name="number" /&gt;
       &lt;/p&gt;
       &lt;p&gt;
         &lt;label&gt;CVV&lt;/label&gt;
         &lt;input type="text" size="4" autocomplete="off" data-encrypted-name="cvv" /&gt;
       &lt;/p&gt;
       &lt;p&gt;
        &lt;label&gt;Expiration (MM/YYYY)&lt;/label&gt;
        &lt;input type="text" size="2" data-encrypted-name="month" /&gt; / &lt;input type="text" size="4" data-encrypted-name="year" /&gt;
      &lt;/p&gt;
      &lt;input type="submit" id="submit" /&gt;
   &lt;/form&gt;
  </code></pre>
  
  <p>This is my app.php (in the same directory as signup.php)</p>
  
  <pre><code>$app = new Silex\Application();
  
  $app-&gt;get('/', function () {
      include 'signup.php';
      return '';
  });
  
  $app-&gt;post('/create_transaction', function (Request $request) {
    echo 'YES';
    $result = Braintree_Transaction::sale(array(
      'amount' =&gt; '1000.00',
      'creditCard' =&gt; array(
        'number' =&gt; $request-&gt;get('number'),
        'cvv' =&gt; $request-&gt;get('cvv'),
        'expirationMonth' =&gt; $request-&gt;get('month'),
        'expirationYear' =&gt; $request-&gt;get('year')
      ),
      'options' =&gt; array(
        'submitForSettlement' =&gt; true
      )
    ));
  
    if ($result-&gt;success) {
      return new Response("&lt;h1&gt;Success! Transaction ID: " . $result-&gt;transaction-&gt;id . "&lt;/h1&gt;", 200);
    } else {
      return new Response("&lt;h1&gt;Error: " . $result-&gt;message . "&lt;/h1&gt;", 200);
    }
  });
  
  $app-&gt;run();
  </code></pre>
  
  <p>I greatly appreciate any advice.</p>
  
  <p>Many thanks in advance!</p>