Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - 6.5.0 slinger. metod POST not work?: (1 Item)
   
6.5.0 slinger. metod POST not work?  
I create simple page with 2 buttons and cgi script:
------------------------------------------------------------------------------------------------------------------------
-------------
<form action="index.shtml" method="post">
<button name="Password" value="123456">Send Post</button>
</form>

<form action="index.shtml" method="get">
<button name="Password" value="123456">Seng Get</button>
</form>

<!--#exec cgi="test.cgi" -->

<p>Method: <!--#echo var="REQUEST_METHOD"-->
<p>Query string: <!--#echo var="QUERY_STRING"-->
<p>CONTENT_TYPE: <!--#echo var="CONTENT_TYPE"-->
<p>CONTENT_LENGTH: <!--#echo var="CONTENT_LENGTH"-->
------------------------------------------------------------------------------------------------------------------------
-------------

Here test script:
#!/bin/sh
PASSWORD=`echo $QUERY_STRING | sed -n 's/^.*Password=\([^&]*\).*$/\1/p'`
echo "<p>Password= $PASSWORD !"
------------------------------------------------------------------------------------------------------------------------
-------------

GET metod work fine
Result with GET button :
Password= 123456 !
Method: GET
Query string: Password=123456
CONTENT_TYPE:
CONTENT_LENGTH:

Button with POST metod not work
Result with POST button:

Password= !
Method: POST
Query string:
CONTENT_TYPE: application/x-www-form-urlencoded
CONTENT_LENGTH: 15
------------------------------------------------------------------------------------------------------------------------
-------------

I can get the length of the string, type, but I can't get the content. 
The variable QUERY_STRING is empty.