1

I would like to make a navigate button: http://tulyita.hu/pr2info.php?name= + PR2name.text

What i write wrong?

Enter your PR2 name: <input type="text" name="PR2name"><br>
<form method="link" action="http://tulyita.hu/pr2info.php?name=" + PR2name><input type="submit" value="Submit"></form>
Kárpáti András
  • 1,221
  • 1
  • 16
  • 35

2 Answers2

3

the methodattribute of the form tag can only tag the value of either "get" or "post".

See this link for explanation.

Your code should look like:

<form method="get" action="http://tulyita.hu/pr2info.php">
    Enter your PR2 name: <input type="text" name="name"><br>
    <input type="submit" value="Submit">
</form>
LuigiEdlCarno
  • 2,410
  • 2
  • 21
  • 37
0

You need Javascript.

var val = document.getElementsByTagName('input[type="text"]').value;

Then pass the val to form.

Also you should also check this about method attribute.

method attribute <form method=“link” > or <a>? What's the difference?

There is no method="LINK" value. This will cause the form to fall back to the default method, GET, which is equivalent to an anchor element with a href attribute anyway.

Community
  • 1
  • 1
Praveen
  • 55,303
  • 33
  • 133
  • 164