开发者

Send form data via GET to page already with variables

This code is only passing the form's GET data, not the GET data that I've already put in there. Why is this?

  <form action="functions.php?q=log" method="GET">
  <input type="text" name="url" />
  <input type="submi开发者_C百科t" />
  </form>


I would create a hidden input like this:

<input type="hidden name="q" value="log" /> and then use action="functions.php".

Like this:

<form action="functions.php" method="GET">
  <input type="text" name="url" />
  <input type="hidden" name="q" value="log" />
  <input type="submit" />
</form>


Here is how you append get data to a form:

<form action="functions.php" method="GET">
<input type="hidden" name="q" value="log" />
<input type="text" name="url" />
<input type="submit" />
</form>

About all I can see is that it could be that the data in the form is overwriting the url and not appending to it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜