0

I am creating a button in php and want to call a php with parameter when clicked:

echo '<form method="get" action="./ash.php?q=Y"    >';
echo '<button type="submit"    >QUERY</button>';
echo '</form>';

When I click on the button, ash.php gets indeed called, but the q parameter has been 'forgotten' in the process. How can that be?

michaelsmith
  • 1,011
  • 1
  • 16
  • 35

1 Answers1

3
echo '<form method="get" action="./ash.php"    >';
echo '<input type="hidden" name="q" value="Y" />';
echo '<button type="submit"    >QUERY</button>';
echo '</form>';
ceadreak
  • 1,662
  • 2
  • 18
  • 27