Ver Mensaje Individual
  #15 (permalink)  
Antiguo 18/03/2011, 09:26
jonathan777
 
Fecha de Ingreso: marzo-2011
Ubicación: lima
Mensajes: 25
Antigüedad: 13 años, 2 meses
Puntos: 0
Respuesta: Pasar valor seleccionado de Select a variable php

Y lo del Select lo hice asi:

Código PHP:
Ver original
  1. function Agregar_Lista($parametro) {
  2.         global $variable_html;
  3.         if ($GLOBALS["direccion"] == $parametro) {
  4.             $variable_html = $variable_html . " " . "<option value='$parametro' selected>" . $parametro . "</option>";
  5.         } else {
  6.             $variable_html = $variable_html . " " . "<option value='$parametro' >" . $parametro . "</option>";
  7.         }
  8.         //$variable_html = $variable_html . " " . "<option value='$parametro' >" . $parametro . "</option>";
  9.     }

Así no tengo que hacer ningún calculo solo comprobación