Drop Down menu populated by a table

wxdqz

New Member
I'm trying to populate a drop down menu with the information from another table, in another database. Here's what I have so far.. but I get this error:

Supplied resource is not a valid PostgreSQL result resource



<?php
$conn = pg_connect("host=postgres user=bla password=bla dbname=bla");
$sql="SELECT * FROM software WHERE id = $id;";
$result_set = pg_Exec($conn,"SELECT * from software");
while($row = pg_fetch_array($conn,result_set))
{
echo "<option value=http://www.phpbuilder.com/board/archive/index.php/\"";
echo $row[id];
echo "\">";
echo $row[software];
echo "</option>\n";
}

?>




what am i doing wrong? thanks! kevin
 
Back
Top