Hello,
For example I have array that looks like this:
[php]$something = array(“20/3/2012” => “25”);[/php]
I have one form with two select or dropdown menus. and my code looks like this.
[php]echo “”;
echo "Mesec: ";
echo “”;
foreach($Meseci as $m => $f)
{
echo “”.$m."";
}
echo “”;
echo " Dan: ";
echo “”;
foreach($Meseci as $m => $f)
{
echo “”.$f."";
}
echo “”;
echo “”;[/php]
What I want to do is that when one select option is clicked, I get other one filled with that “=>25” number. Now, what I have been trying to do is that on change, first dropdown menu auto submits and that works, but then select option is not getting replaced to what I have selected. I didn’t add to this code here, but I have been trying with $_POST variable and it either ends up with first form gets filled with just one name, or it doesnt remember which one was last selected.
Is there a way to handle this? Also, can I make form to autosubmit to its self? because I woud probably need two similar forms and I need selections to be different (to remember different).
Thanks.