title: Form action and post method not working php
body: <p>i have a pay.php script which needs to be executed after an input of an amount. But the file pay.php does not load.</p>
  
  <p>html code:</p>
  
  <pre><code>&lt;div class="sap_tabs"&gt;
                          &lt;div id="horizontalTab" style="display: block; width: 100%; margin: 0px;"&gt;
                              &lt;div class="pay-tabs"&gt;
                                  &lt;h2&gt;Select Payment Method&lt;/h2&gt;
                                    &lt;ul class="resp-tabs-list"&gt;
                                        &lt;li class="resp-tab-item" aria-controls="tab_item-0" role="tab"&gt;&lt;span&gt;&lt;label class="pic1"&gt;&lt;/label&gt;Cash&lt;/span&gt;&lt;/li&gt;
                                        &lt;li class="resp-tab-item" aria-controls="tab_item-1" role="tab"&gt;&lt;span&gt;&lt;label class="pic3"&gt;&lt;/label&gt;Cheque&lt;/span&gt;&lt;/li&gt;
                                        &lt;li class="resp-tab-item" aria-controls="tab_item-2" role="tab"&gt;&lt;span&gt;&lt;label class="pic4"&gt;&lt;/label&gt;Mobile Money&lt;/span&gt;&lt;/li&gt;
                                        &lt;div class="clear"&gt;&lt;/div&gt;
                                    &lt;/ul&gt; 
                              &lt;/div&gt;
                              &lt;div class="resp-tabs-container"&gt;
                                  &lt;div class="tab-1 resp-tab-content" aria-labelledby="tab_item-0"&gt;
                                      &lt;div class="payment-info"&gt;
                                          &lt;h3&gt;Details&lt;/h3&gt;
                                          &lt;form method ="post" action"pay.php"&gt;
                                              &lt;div class="tab-for"&gt;               
                                                  &lt;h5&gt;Amount&lt;/h5&gt;                                                 
                                                      &lt;input type="text" name = "amount" id ="amount" required /&gt;
                                              &lt;/div&gt;
                                                &lt;input type="submit" value="Submit" /&gt;                                                
                                          &lt;/form&gt;
  
                                      &lt;/div&gt;
                                  &lt;/div&gt;
  </code></pre>
  
  <p>when i load the file pay.php separately i do not get any issues. 
   but when i enter an amount and click submit the form action does not run or work to insert the data into the database.</p>
  
  <p>php code:</p>
  
  <pre><code>&lt;?php
  if(isset($_POST['Submit'])){
   $username="xxxx"; // Mysql username 
   $password="xxxx"; // Mysql password 
   $db_name="shipping_pro"; // Database name  
   $tbl_name="payment_cash";
  
   try {
  
   //connection 
   $conn = new PDO('mysql:host=localhost;dbname=shipping_pro', $username, 
    $password);
   $conn-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
   $amount = filter_input(INPUT_POST, 'amount');
    $sql= "INSERT INTO payment_cash(Amount) VALUES('$amount')";
    if ($conn-&gt;query($sql)) {
      echo "&lt;script type=\"text/javascript\"&gt;
      alert(\"Payment Received Thank You!.\");
      window.location = \"../dashboard/index.php\"
  &lt;/script&gt;";
  }
  
  }
  catch (PDOException $e) {
  echo $e-&gt;getMessage();
  }
  }
  ?&gt;
  </code></pre>