Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/04/2009, 21:36
Avatar de konoyek
konoyek
 
Fecha de Ingreso: julio-2007
Mensajes: 268
Antigüedad: 17 años, 7 meses
Puntos: 0
Php identificar variables

tengo el siguiente codigo:

Código HTML:
if ($fin >= $bjok-1 and $fin <= $bjok1) {
$temporada= Baja;

}
elseif ($fin >= $mdok-1 and $fin <= $mdok1) {
$temporada= Media;

}
elseif ($fin >= $bj2ok-1 and $fin <= $bj3ok1) {
$temporada= Baja;

}
elseif ($fin >= $atok-1 and $fin <= atok1) {
$temporada= Alta;


}


echo "<br><br>Temporada: <input name='total' type='text' id='fin2' size='1' value='$temporada' maxlength='8' />";
echo "<br><br>Cantidad de noches: <input name='total' type='text' id='fin2' size='1' value='$dias_diferencia' maxlength='8' />";

<input name="sgl" type="text" class="tabla1" value="<? echo $peso2; print number_format($tarifa, 0, '', '.'); ?>" /> 
lo que necesito es identificar una variable en este caso $temporada y de ahi derivar varias funciones



mi idea es esta:

if ($temporada = Baja) {
$tarifa = 999999;
}
elseif ($temporada = Alta) {
$tarifa = 100000 ;
}
elseif ($temporada = Media) {
$tarifa = 500000 + 15000 ;
}

pero cuando me arroja un valor
"baja" me da el valor de 999999, pero si lo paso a Media me sigue el mismo valor