Ver Mensaje Individual
  #3 (permalink)  
Antiguo 27/09/2009, 13:47
Avatar de gjx2
gjx2
 
Fecha de Ingreso: agosto-2008
Ubicación: R.D
Mensajes: 1.153
Antigüedad: 15 años, 9 meses
Puntos: 139
Respuesta: Problemas al enviar correo

Código PHP:
Ver original
  1. // Crear una funcion que convierta el numero selecionado de profecion en el testo correspondiente.
  2.     function ch_profeciones($id){
  3.    
  4.    
  5.     // Creo una matriz con el mismo orden con el que creaste el select del formulario.
  6.     $profeciones = array(
  7.     0=> "Informatica",1=>"Contabilidad",2=>"Derecho",3=>"Mercadeo",4=>"Publicidad");
  8.    
  9.    
  10.     foreach($profeciones as $row => $field){
  11.    
  12.            
  13.         if($id == $row){
  14.            
  15.             return $field;
  16.            
  17.         }
  18.        
  19.    
  20.     }
  21.    
  22.    
  23.        
  24.    
  25.    
  26.     }
  27.    
  28.     $cuerpo .= "Profesión: " .ch_profeciones($_POST["Profesion"])."\n";  // llamo la funcion