Hi! I need some help...
i searched a lot.. but dind't found or worked any code.. so i need help please..
i just need a simple thing...
i want to show on a combobox, a list of the things that i have (inserted before on my database-postgreSQL) on a collumn from a table...
i.e. Want a combobox that when i click on it, it show's all my client's name that i have on my database (my database is on postgreSQL).
I have this code to make a combobox on my Base.php :
function Combo($sql, $strValue, $strText) {
$exec = pg_query($this->db, $sql);
$strHTML = "";
for($x=0;$x<pg_num_rows($exec);$x++){
$dados = pg_fetch_assoc($exec);
$strHTML = $strHTML ."<option value='" .$dados[$strValue]. "'>" .$dados[$strText]. "</option>\n";
}
return $strHTML;
}
but i don't know what to set on my page side:
</div>
<form action="criaruser.php" method="post">
<table width="280" border="1">
<strong><td> Client Name:</td></strong>
<td><select name="[B]???[/B]" style="width:150px;">
<option value="">[Todos]</option>
<?=$db->Combo([B]????[/B], [B]????[/B], [B]????[/B])?></select></td>
</table>
</strong>
what should i put on ???? parts ?