 
			
				20/02/2010, 10:04
			
			
			     |  
      |    |    |    Fecha de Ingreso: julio-2008  
						Mensajes: 39
					  Antigüedad: 17 años, 3 meses Puntos: 0     |        |  
  |      Respuesta: AYUDA COMBO PHP y MYSQL         Cita:  dni_fotografo: 
<?php 
$link=mysql_connect("localhost","root",""); 
mysql_select_db("agencia",$link); 
echo"<select name=dni id=dni>";   
$sql="select dni_fotografo from fotografos"; 
$result=mysql_query($sql); 
$i=0; 
while ($row=mysql_fetch_row($result)) 
{ 
echo "<option value=".$row[$i].">".$row[$i]."</option>\n"; 
} 
echo "</select>"; 
?>   
id_ecliente: 
   <?php 
$link2=mysql_connect("localhost","root",""); 
mysql_select_db("agencia",$link2); 
echo"<select name=id_ec id=id_ec>";   
$sql="select id_ecliente from empresa_cliente"; 
$result=mysql_query($sql); 
$i=0; 
while ($row=mysql_fetch_row($result)) 
{ 
echo "<option value=".$row[$i].">".$row[$i]."</option>\n"; 
} 
echo "</select>"; 
?>     el cod que me funciono            |