los registros del a bd a medida que el select cambie de opcion me podrian dar una mano con este codigo
solo muestra los barrios pero si respectiva columna no
es una tabla dos campos:BARRIOS Y COMUNAS
no me da el arreglo
gracias por la ayudita
Código PHP:
   <?php 
include 'conexion.php';
conectar(); 
$qry=mysql_query("select * from barrio"); 
$row=array(); 
while($r=mysql_fetch_assoc($qry)){ 
$row[]=array($r['BARRIOS'],$r['COMUNAS']); 
} 
?>
<form id="form1" name="form1" method="post" action=""> 
  <select name="curso" id="curso" onchange="document.getElementById('data').value=this.options[this.selectedIndex].getAttribute('BARRIOS')+'\n'+this.options[this.selectedIndex].getAttribute('COMUNAS')"> 
<?php foreach($row as $v){ ?> 
    <option  value="<?php echo $v[0] ?>"><?php echo $v[0] ?></option> 
<?php }?> 
  </select> 
  <input  type="text" name="data" id="data" value="<?php echo $v[10]."\n".$v[1][0] ?>"></textarea> 
</form>    
 

