Thanks for the replies...
To clarify, I have 4 submit buttons on one form. 3 of the buttons toggle more/less history from the DB. The last button toggles printer versus screen friendly.
I am maintaining boolean values of the state of each in hidden fields for persistence.
When I submit for "more history" using button #1, then submit for printer friendly using button #4, button #1 returns to the "less" state (the button value, as well as the displayed info).
I found another thread in a different forum that suggests that there may be a PHP bug involved. Here is that entry:
if ($submit1)
$executestring = "Location: submit1.php";
if ($submit2)
$executestring = "Location: submit2.php";
header($executestring);
Using multiple buttons in this way is far easier for newbies (such as myself) to do than some people think. Just create a form that reloads itself (with $PHP_SELF). Rename each submit button to whatever name you like and include 'if' statements at the top of your script to read and act upon the input from the user.
It's that easy and the method I always use. However, watch out for some interesting bugs in PHP. I came across one a couple of weeks ago where a button check like the one above always entered the code in the first 'if' no matter what button was pressed and then executed the code for the right button afterwards. This was fixed with a workaround but it was a pain in the butt.
My code is similar, except instead of calling .php code, I invoke an include (of php code).
Does that help? Can you help?
Thanks so far!!