Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/05/2012, 06:01
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: recuperar el texto de una opcion

la idea es esta
Cita:
<select name='selecion' onchange="this.name = this.name + '[' + this.options[this.selectedIndex].text + ']'">
al recogerlo
Cita:
$valores = array($_POST['selecion']);

foreach($valores[0] as $key => $valor) {
$fields[] = $key;
$values[] = $valor;
}

echo 'texto ' .implode(",", $fields). ' valor ' .implode(",", $values);
__________________
if(ViolenciaDeGénero) {alert('MUJER ASESINADA');}