Hello!
I'm trying to build a reporting page where I'll be listing the counts of various things in a MySQL database. The trick is I want all of these counts to be hyperlinks so that when clicked, it will redraw the page as before, but provide further details at the bottom of the page about the item that was clicked.
What I've been trying to do is set up a hyperlink to the current page passing info about which field I want to show the detail about below....something along these lines:
<?
echo "<a href='$PHP_SELF?detailrow=$row&detailcolumn=$column'>$value[$row][$column]</a>";
?>
In practice, when I've clicked on this link, it doesn't reload my page at all....and therefore never kicks off all the code I have at the end of my page that's supposed to run whenever it sees values for $detailrow and/or $detailcolumn.
Now I've already thought of a couple alternate ways I could do this:
(1) Use a <form> with a bunch of submit buttons instead of hyperlinks, and submit the results back to $PHP_SELF
(2) Create a <frame> or <iframe> and display the extra detail in there instead of in the same page
...but the thing is (1) I would prefer to use hyperlinks rather than buttons, and (2) I don't like the scrollbars that would result from using a frame.
So I guess my underlying question is, is it possible to reload your current page and pass it new variables using a simple <A HREF...> tag? Or is that the exclusive domain of a <FORM> tag?
Alternately, is there a way I could trigger the submission of a form using an <A HREF...> tag of some sort?
Thanks for any tips!!
-- Daryl