HTML FORMS selected question - Mailing list pgsql-php

From Mag Gam
Subject HTML FORMS selected question
Date
Msg-id 1cbd6f830612031442g23828ca7wad97fa4905aacc65@mail.gmail.com
Whole thread Raw
Responses Re: HTML FORMS selected question  (Chris <dmagick@gmail.com>)
List pgsql-php
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!

pgsql-php by date:

Previous
From: "Moller, Cameron"
Date:
Subject: Re: Unsubscribe - Instructions
Next
From: Chris
Date:
Subject: Re: HTML FORMS selected question