开发者

PHP GET get more one element by one input

开发者 https://www.devze.com 2023-03-28 02:39 出处:网络
If I have this code: <input type=\"hidden\" name=\"hello\" value=\"hey\" /> <input type=\"text\" name=\"one\" />

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

精彩评论

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