On the way of learning &quot; handling POST request in php&quot; i tried to make a simple python http client using httplib2 &amp; urllib module.. what i wanted to do was submitting username &amp; password field to a php script (which just echo&#39;s the username &amp; password)  &amp; prints the response in python,not in html/php.. <br>
<br>import httplib2<br>import urllib<br>url=&quot;<a href="http://localhost/form_process.php">http://localhost/form_process.php</a>&quot; <br>body={&#39;username&#39;:&#39;xyz&#39;,&#39;password&#39;:&#39;abc&#39;}<br>h=httplib2.Http()<br>
response,content=h.request(url,&#39;POST&#39;,urllib.urlencode(body))<br>print content<br><br>I got the following content:<br><pre id="line1"><b>&lt;<span class="start-tag">html</span>&gt;<br>&lt;<span class="start-tag">head</span>&gt;&lt;<span class="start-tag">title</span>&gt;Form processing&lt;/<span class="end-tag">title</span>&gt;&lt;/<span class="end-tag">head</span>&gt;<br>
&lt;<span class="start-tag">body</span>&gt; <br>: &lt;/<span class="end-tag">body</span>&gt;<br>&lt;/<span class="end-tag">html</span>&gt;</b><br></pre><br>instead of: <br><pre id="line1"><b>&lt;<span class="start-tag">html</span>&gt;<br>
&lt;<span class="start-tag">head</span>&gt;&lt;<span class="start-tag">title</span>&gt;Form processing&lt;/<span class="end-tag">title</span>&gt;&lt;/<span class="end-tag">head</span>&gt;<br>&lt;<span class="start-tag">body</span>&gt; <br>
xyz: abc&lt;/<span class="end-tag">body</span>&gt;<br>&lt;/<span class="end-tag">html</span>&gt;</b><br></pre>attachments: <br>form.php # takes username,password from the user,pass those to<br>              # form_process.php as GET parameter<br>
form_process.php # echo username,password.<br><br>sorry for my long email.<br><div style="visibility: hidden; left: -5000px; position: absolute; z-index: 9999; padding: 0px; margin-left: 0px; margin-top: 0px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 130%;" id="avg_ls_inline_popup">
</div>