php - Using get method on form, part of action url doesnt show up when submitted -
i have strange issue have following form/php form handler:
<form id="search" method="get" action="page.php?pg=xxxxxx">
on submit, in url domain.com/page.pgp?action=xxxx....(more parameters here). how can pass pg=xxxx action url correctly? tried throwing & sign (page.php?pg=xxxxxx&) didn't seem work either.
you passing pg value of "xxxxxx" incorrectly. these values should passed in input tags inside form, instance:
<form id="search" method="get" action="page.php> <input type="hidden" name="pg" value="xxxxxx"> <input name="submit" value="submit"> </form>
the previous code creates form button called "submit", , when press it, takes page action.php query string wanted in url:
hope helps! :)
Comments
Post a Comment