title: Post method in Python using requests
body: <p>I have simple form which accepts text and calls a php file abc.php through post method:</p>
  
  <pre><code>&lt;form method='post' action="abc.php"&gt;
  &lt;input type="textarea" name="text"&gt;
  &lt;input type="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>contents of abc.php</p>
  
  <pre><code>&lt;?php
  $msg=$_POST["text"];
  print $msg;
  ?&gt;
  </code></pre>
  
  <p>I wrote a python script for posting messages using requests library as follows:</p>
  
  <pre><code>import requests
  keys={'text':'lol rofl'}
  r=requests.post("http://127.0.0.1/abc.php/POST",params=keys)
  print r.url
  print r.text
  </code></pre>
  
  <p>I was getting the following output(error):</p>
  
  <pre><code>  http://localhost/abc.php/POST?text=lol+rofl
  
  &lt;b&gt;notice&lt;/b&gt;:undefined index;text in C:/xampp/htdocs/abc.php on line 2
  </code></pre>
  
  <p><b>note</b>:form and abc.php works perfectly when run from the browser</p>