Ver Mensaje Individual
  #3 (permalink)  
Antiguo 29/06/2011, 17:10
Avatar de truman_truman
truman_truman
 
Fecha de Ingreso: febrero-2010
Ubicación: /home/user
Mensajes: 1.341
Antigüedad: 15 años, 1 mes
Puntos: 177
Respuesta: Variable igual a varios condicioales condicional

debería ser algo así

Código PHP:
Ver original
  1. <?php
  2. $base_datos = '';
  3.  
  4. if ($_POST['curso'] == '1ºESO') {
  5. $base_datos = 'usudarios1.bd';
  6. }
  7.  
  8. if ($_POST['curso'] == '2ºESO') {
  9. $base_datos = 'usudarios2.bd';
  10. }
  11. ?>
  12.  
  13. <select name="curso">
  14. <option value="1ºESO">1ºESO</option>
  15. <option value="2ºESO">2ºESO</option>
  16. </select>
__________________
la la la