Hi there.
I have a table that I want to display into a dropdown box...
I think I want an equivalent of

while not eof
print name

I think thats how you do it in MySql.. but I need to use Postgresql...

I'm sorry if this has been covered.. I have been looking through the forum... but can't seem to find it....

Thanks in advance
Beth

    you need something like

    $query = "select name from table";
    $result = pg_query ($query);
    
    echo "<SELECT name="names">";
    
    while ($row = pg_fetch_array($result)) {
      echo "<option value=\"" . $row['name'] . "\">";
    }
    echo "</SELECT>";
    

    hth

      Thanks! works well :-) and I even got the select working for the drop down list :-)
      Beth

        Write a Reply...