hi - we are trying to figure out how to create a self populating selection box from which you can choose more than one value and are wondering - does anyone know how ??? this is the script that works great for choosing ONE of the options butthe goal is to be able to choose more ...
<?php
$table="scholarship"; // name of the table
$limit="20"; // limit # of records in select box
$orderBy="level"; // Usually a column name
$conn = pg_connect("","","","","funds");
if
(!$conn)
{echo "Could not make a connection";exit;}
$sql = "SELECT DISTINCT level FROM $table order by $orderBy;";
$select_box = pg_Exec($conn, $sql);
$numrecords = pg_NumRows($select_box);
echo "<select name=select>";
//pre selected option
echo"<option value=\"none\">select type</option>";
//loop through database to populate select box
for ($j=0; $j < $numrecords; $j++) {
$value = pg_result($select_box, $j, "level"); //column name for the value of the checkbox
$option = pg_result($select_box, $j, "level"); // select option column name
echo"<option value=\"$value\">$option</option>";
}
echo"</select>";
?>
and will we have to do something to the database in order for this to work when more than one selection is made ????? thanks for any help that anyone can offer.