tjbarr wrote:What is the long answer?
$cnty_ch=$_GET['cbocnty'];
// now $cnty_ch is an array and you can
print_r($cnty_ch);
// which should yield .. Array ( [0] => DE005 )
tjbarr wrote:Not sure what the problem is. In the database the years are stored as 1983A1 and in my select boxes the hidden first column is 1983Al
Now, you seem to have some problems with the form that submits all these values, so post the form code here please and I'll be able to understand what is going on a bit better. Bear in mind that the value returned from a select list is designated by
<select name="cboyear">
<option value="_1983A1">1983</option>
<option value="_1984A1">1984</option>
</select>
But in the meantime, to use the selected year as the column name
$year=$_GET['cboyear'];
$query = "SELECT " . $year . " FROM table WHERE ";