I am having trouble getting values populated in my form... Here is what I got so far:
//The values that need to be selected
$result_ip=pg_query($dbconn,$test_query);
<SELECT NAME="ip[]" SIZE=10 MULTIPLE>
<?php
//This will show ALL values.
while($rows=pg_fetch_array($result)){
foreach ($options as $index => $option) {
if ($rows[1]==$option)
{
echo "<OptioN VALUE=\"$rows[0]\" selected=\"selected\">$rows[1]</Option> \n";
break;
}
else
{
echo "<OPTION VALUE=\"$rows[0]\">$rows[1]</OPTION> \n";
break;
}
}
}
What am I doing wrong?
TIA!