Ver Mensaje Individual
  #3 (permalink)  
Antiguo 27/12/2007, 14:25
Avatar de omar1977
omar1977
 
Fecha de Ingreso: abril-2006
Mensajes: 178
Antigüedad: 18 años, 1 mes
Puntos: 4
Re: if multiple en php-mysql

Cita:
Iniciado por erudito31 Ver Mensaje

if($rows['tbusiness'] == 'Wholesales'){
print "<script>window.open('/mayoristas/index.htm','_self');</script>";
}
if ($rows['tbusiness'] == 'Retail'){
print "<script>window.open('/minoristas/index.htm','_self');</script>";
}elseif ( aca te falta una condicion = $rows['tbusiness'] == 'Otra Cosa') ) {
print "<script>window.open('/venezuela/index.htm','_self');</script>";
}
en todo caso te sale ams como usar CASE por ejemplo:

switch ($rows['tbusiness'] ) {
case 'Wholesales':
print "<script>window.open('/mayoristas/index.htm','_self');</script>";
break;
case 'Retail':
print "<script>window.open('/minoristas/index.htm','_self');</script>";
break;
case 'Otro':
print "<script>window.open('/venezuela/index.htm','_self');</script>";
break;
default:
break;
}

espero te sirva...
saludos y feliz año nuevo
__________________
no hay nadie que sea tan inutil, por ultimo sirve como mal ejemplo