I'm trying to do something seemingly simple, but about which there is an astounding lack of information.
I've got what is right now a static web page, with a very large table full of images. What I'd like to do is divide up those images into categories, and create a select box the contents of which will determine which category of images to actually write to the page.
I *thought* I'd done something like this before, perhaps having the onChange call set a variable, or call a function to determine which option is selected and then write the correct part of the page...i.e.
<select>
<option value="something1" onChange="some function setting var imageCategory to '1'">
<option value="something2" onChange="some function setting var imageCategory to '2'">
</select>
<?php
if (imageCategory == 1)
{
echo("<table>");
echo("<tr><td><img blah blah blah></td></tr>");
echo("</table>");
}
else if(imageCategory == 1)
{
you get the picture.
}
?>
I realize that there are some inconsistencies in there, namely in getting the php to re-run (or the page to resubmit, whichever comes first), but if I knew the answers I wouldn't be asking, would I?
Many thanks for any help,
-Laura