HELP! I have a dynamic dropdown pulling from an array. The code:
<? echo "<select name='code_basis'>\n";
for ($n=1;$n<=57;$n++)
{
echo "<option value=$n\n";
echo "> $basiscodes[$n]\n";
echo "</option>\n";
}
echo "</select>"; ?>
</td>
The dropdown works fine, but when it writes the data to the database the value written is the number in order from the array. So if the item selected is "Visa" and it is the third item in the array, the data written to the database is "3" not Visa. Can someone please steer me in the right direction on this?
Thanks