Hello,
I have a form with a <SELECT> and on submit it runs a php code that:
1. gets fields from a table by a certain order
2. outputs the result to a HTML table
The final result has several tables (each one corresponds to an item on the SELECT).
Code Eg:
from the HTML form:
<form action="glossResultII.php" method="get" target="mainFrame">
<select name="gsearch[]" MULTIPLE SIZE="2">
<option value="1">Hardware</option>
<option value="2">Software</option>
</select>
relate to the PHP result table:
printf("<TR><TD><A NAME=$type_name></A>");
printf("$type_name</TD></TR>");
I tried to use a case but it didn't work:
switch($gsearch[$k]){
case "1" : printf("<A HREF=\"glossresultII.php#Hardware\" target=\"mainFrame\" name=\"Hardware\"></A>");break;
case "2" : printf("<A HREF=\"glossresultII.php#Software\" target=\"mainFrame\" name=\"Software\"></A>");break;
}
The array is working Ok (if I echo $gsearch[$i] it shows the correct value) but the switch isn't doing anything, therefore the anchors aren't working...
Any suggestions?!
TIA
Arabela