note 20426 deleted from function.mysql-fetch-array by betz
| From: | betz@php.net | Date: | Sat, 10 Aug 2002 16:42:47 +0000 |
| Subject: | note 20426 deleted from function.mysql-fetch-array by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-34744@lists.php.net to get a copy of this message | ||
Hello Im Edgar and Im having problems doing a query with fetch array when I try to print a menu list
in HTML.
I dont know how to print a list values in HTML comming fron a query.
I hope you help me plis.
This is the code:
Code________________________
$resultado1 = mysql_query("select id_proy,nombre_proy from proyecto where
proyecto.login='$Usuario'");
print "<select name='Proyecto'>";
//for ($i = 0;$line = mysql_fetch_array($resultado1);++$i)
// { //abre for
while ($line = mysql_fetch_array($resultado1)) {
$ID= $row[0];
$Nombre= $row[1];
$Valor = "<option value=";
$Valor = $Valor.$ID;
$Valor = $Valor.">";
$Valor = $Valor.$Nombre;
$Valor = $Valor."</option>";
//print "<option
value=".$ID.">".$Nombre." ".$Cliente."</option>";
echo $Valor;
} //cierra while