开发者

PHP GET get more one element by one input

If I have this code:

<input type="hidden" name="hello" value="hey" />
<input type="text" name="one" />

And I'll write somet开发者_如何学编程hing, for example: "hey", it will show:

domain.com/index.php?hello=hey&one=hey

But, I want to get more element from specific input. For example:

This is my full code: For e

<input type="hidden" name="hello" value="hey" />
<input type="text" name="one" />
<input type="text" name="two" />

If I write on "one", it will show: domain.com/index.php?hello=hey&element=sometext&one=sometext

If I write on "two", it will show: domain.com/index.php?hello=hey&another_element=sometext&two=sometext

How can I do that?

Sorry for my english.


Just use the "GET" method :

<form method="get">
    <input type="hidden" name="hello" value="hey" />
    <input type="text" name="one" value="1" />
    <input type="text" name="two" value="2" />
</form>

It will create the query string ?hello=hey&one=1&two=2

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜