I am writing a search form in PHP. I want the user to be able to add search fields using the following submit button:
<input type="submit" name="fields" value="<?php echo $fields+1 ?>" />
Now the button shows the value of $fields + 1
. Actually, I want the button to display something else (for example, add a new field). Just adding text between the <input>...</input>
does not help. The text is simply displayed to the right of the button.
How to change the text on a button and pass the value of $fields + 1
to GET / POST?
source share