Re: problem with select option

From: ryanne cruz <ryanne(dot)cruz(at)up(dot)edu(dot)ph>
To: "\\\"pgsql-php(at)postgresql(dot)org\\\"" <pgsql-php(at)postgresql(dot)org>
Subject: Re: problem with select option
Date: 2003-01-30 06:53:08
Message-ID: 1043909588.3e38cbd4354ca@mail.up.edu.ph
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php


hi list.

i have a script that works initially. here is the script:

<?php
$conn=pg_connect("host=127.0.0.1 dbname=db user=name password=pword");
if (!$conn){
echo("<P> Unable to connect to the database server at this time.</P>");
exit(); }
else{$query0="SELECT municipality FROM municipality where provinceid=$provid
order by municipality;";
$result0=pg_exec($conn, $query0);
}
$numrows0=pg_numrows($result0);
$CurrentRow0=0;
while ($CurrentRow0 < $numrows0) {
$model0=pg_result($result0, $CurrentRow0);
echo "<font face=\"Verdana\" size=1><option
value=$model0>$model0</option></font>";
$CurrentRow0++;
}
?>

this is only part of the script. when no municipality is chosen, this still
works. what i mean is that it still shows the municipalities in the drop down
box. but if i choose a certain municipality, there will be no municipalities
shown in the drop down box.

i know there's something wrong with the script but i just can't figure it out.
any ideas?

thanks.

ryanne

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Irshad Chamroo 2003-01-30 07:08:44 URGENT : pgsql for windows
Previous Message Matthew Horoschun 2003-01-30 05:10:15 Re: underscore