BGSBNNY
BGSBNNY

Reputation: 7

Button as link which pass parameters

I have this link which pass the parameter.

   <a href="?spalte=7">Malvenfroh City  <br> </a>

But I want that this whole thing is a button but in this case it doesnt work, why?:

<form action="?spalte=7">
    <input type="submit" value="Malvenfroh City">
</form>

Have someone another solution ?

Upvotes: 1

Views: 646

Answers (1)

Alfasatwi
Alfasatwi

Reputation: 62

You can simply pass the parameters as a hidden input inside the form, here is an example:

<form action="#" method="get">
    <input type="hidden" name="spalte" value="7">
    <input type="submit" value="submit">
</form>

I hope this helps.

Upvotes: 1

Related Questions