Since the listbox below is a multiple select box will it store the answers in an array as the code is written below or does it need to be modified. If this will store the selections in an array, how can I echo an element of the display.
Please choose the Variables you want for Source - U.S. Bureau of Labor Statistics:<br>
<select name="cbovarbls" size="auto" multiple class="listbox">
<?php
/
Create your SQL statement
/
$sql="SELECT var_no, var_name from tbl_ei_var WHERE (ei_id=$ind_ch) AND (srce_id=111);";
$result_set = pg_Exec ($conn, $sql);
$rows = pg_NumRows($result_set);
if ((!$result_set) || ($rows < 1)) {
//No connection or no rows returned, so print an error
echo "<H1>ERROR - no rows returned</H1><P>";
exit; //exit the script
}
for ($j=0; $j < $rows; $j++) {
echo "<option value=".pg_result($result_set, $j, "var_no")."> ".pg_result($result_set, $j, "var_name")."</option>";
} } }
?>
</select>