Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/07/2011, 00:52
Avatar de totti026
totti026
 
Fecha de Ingreso: junio-2011
Mensajes: 150
Antigüedad: 12 años, 10 meses
Puntos: 4
Pregunta redireccionar a paginas

Hola que tal
tengo el siguiente problema:
hay un select option y cuando elijo cierta opcion al darle buscar necesito q me lleve a la pagina que le corresponde

este es el formualario:

Código HTML:
Ver original
  1. <form method="POST" action="buscadorinvitado.php">
  2.    
  3.        
  4. Nombre:<input type="text" name="T1" size="20" style="width: 293px; height: 22px">
  5.    
  6.  Carrera: <SELECT NAME="carrera">
  7. </SELECT >
  8.             <br>
  9.  
  10. <input type="submit" value="Buscar" name="buscar" class="auto-style7" style="width: 134px; height: 32px">
  11.                 <input name="button" type="button" onclick='location.href="index.php"' value="Cancelar" style="width: 134px; height: 32px" class="auto-style6">
  12. </form>

y este es el que recibe y supuestamente me redirecciona, pero no hace

Código PHP:
Ver original
  1. <?php
  2. if($_POST["carrera"]=="a")
  3. {
  4. header ("ba.php");
  5. }
  6. elseif($_POST['carrera']=="b")
  7. {
  8. header ("b.php");
  9. }
  10. elseif($_POST['carrera']=="c")
  11. {
  12. header ("c.php");
  13. }
  14. elseif($_POST['carrera']=="d")
  15. {
  16. header ("d.php");
  17. }
  18. elseif($_POST['carrera']=="e")
  19. {
  20. header ("e.php");
  21. }
  22. elseif($_POST['carrera']=="f")
  23. {
  24. header ("f.php");
  25. }
  26.  
  27. ?>

O existe algun otro metodo para hacerlo??