Avatar of zorba111
zorba111

asked on 

how to have a form call itself again, with all its GET vars, plus a new one

I have a page with a few forms on it, and for one of the forms, when u press a given button I want the page called again, with all its GET data that was received resent again, plus one or two new name=value pair (one hardcoded and one from an <input> field perhaps?).

I first thought of setting up this form like:

<form action="<?php echo $_SERVER['PHP_SELF'].$HTTP_GET_VARS."&name=value"; ?>" get="post">

..and then any <inputs> would have their name=value pairs appended also

but it doesn't seem to work

- am I hoping that $HTTP_GET_VARS is more object oriented than it actually is ?
I could break out all the substrings using a foreach, and generate a parameter string, but that seems too boring for a newish language like PHP - is there a shortcut that I'm missing ?

ta
PHP

Avatar of undefined
Last Comment
zorba111

8/22/2022 - Mon