Back in my day, we called these hidden form elements.
<form action="/cgi-bin/delete.pl" method="POST" accept-charset="UTF-8"
<label for="id"> Your token</label>
<input id="id" name="token" type="text" class="form-control" reado
<input type="hidden" name="key" value="gfgf">
<input type="hidden" name="usr" value="rob">
<button name="submit" type="submit" class="btn btn-primary">Delete<
Fortunately, we've learned a few things since then, like:
- Send values via method=POST so you don't broadcast your values in the action URL even when using SSL/TLS
- .cgi is a pain to maintain (use Dancer2 or Mojo)
To answer your question about what is happening? The browser is resetting the query part of your action (when method=GET, adding only the named form elements to the call to action and stupidly dropping what's in there. I am sure I had actions with query params in them once upon a time, and I don't recall the query string being fully replaced. But in any case, that's what's happening. I bet if you set method=POST and kept that action it would retain your query params. But use the <input type="hidden"..., that's what it's for.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||