<FORM>
<b>
<h2>Economic Indicators</h2>
</b>
<p align="left">Please select the regional unit of your interest: <br>
<select name="cboregion" size="6" multiple class="listbox">
<?php
/
Create your SQL statement
/
$sql="SELECT reg_id, reg_name from tbl_regions;";
$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, "reg_id")."> ".pg_result($result_set, $j, "reg_name")."</option>";
}
?>
</select>
<input type="submit" name="submit" value="submit">
<?php
if ($_POST['cboregion'] == 4)
{
$nextForm = "1.php";
}
else {
$nextForm = "home2".php;
}
header("Location: $nextform?cboregion=$_POST[cboregion]");
?>
</FORM>