I’ve been working with PHP lately, and I came across something I couldn’t solve.
So basically, I have a form:
<form method="get">
<fieldset class="display-options" style="float: left">
Search by name or ip:
<input type="text" name="key" value="" />
<input type="submit" class="button2" value="Search" />
</fieldset>
</form>
The problem is, I currently already have a argument:
http://example.com/logs.php?type=admin&page=1
How would i pass the given form argument with the already existing arguments? Like so:
http://example.com/logs.php?type=admin&page=1&key=name
Thanks in advance, AJ.
<snip />
EDIT: hidden fields is your best and most reliable option.
Place a couple of those in your
<form>element and they’ll get passed along with the other data.You shouldn’t need an
isset()but it might be a good idea.