post web request
I have a problem in posting parameters to a server...
as I know that when I send a request like the following: http://www.xxxxx.xxx?var1=**&var2=**&...etc.
parameters var1 and var2 till var(n) must be in the form tag...
<input type=hidden name=var1 value="10"/>
<input type=text name=var2 value="sami"/>
and so on..
But I faced one web site that expect some parameters that are not in the form The exact form:
<form method="POST" name="snd" action="a2b.php">
...
<input type="image" value=开发者_运维问答"ok" name="s1" id="btn_ok"
class="dynamic_img" src="img/x.gif" alt="تمام"/>
</form>
here this post sends parameters a2b.php?...&s1.x=10&s1.y=20
but there is no any inputs named s1.x or s1.y in this form. Is it possible to put parameters in the form of (var.var)?
That's what an image button is sending when you use it to post the form. There should be an input
with type="image"
and name="s1"
.
精彩评论