Foros del Web » Programando para Internet » PHP »

Problema con formularios

Estas en el tema de Problema con formularios en el foro de PHP en Foros del Web. Hola tengo un porblema con el codigo php del formulairo , ya que no envia el email al destinatario no se cual es el error ...
  #1 (permalink)  
Antiguo 25/05/2010, 11:31
 
Fecha de Ingreso: febrero-2010
Mensajes: 22
Antigüedad: 14 años, 2 meses
Puntos: 0
Problema con formularios

Hola tengo un porblema con el codigo php del formulairo , ya que no envia el email al destinatario no se cual es el error aqui dejo el php codigo.

Código PHP:
<?php
$mensage 
$_POST['mensage'];
$email$_POST['email'];
$respuesta$_POST['respuesta'];
$server"[email protected]";
$html '<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
#boxM {width:474px; background:url(http://nximage.nexoneu.com/en/main/box_bg.gif) repeat-y; padding:4px 12px; }
#boxM img { vertical-align:top}  
.banM1 { width:476px; height:169px;  background:url(http://nximage.nexoneu.com/en/main/bn_center1.gif) no-repeat  }
.banM2 {margin-bottom:10px;  width:476px; height:169px;  background:url(http://nximage.nexoneu.com/en/main/bn_center2.gif) no-repeat  }
 .banM1 div, .banM2 div { padding:125px 0 0 20px;}
*/
#boxM {width:474px; background:url(http://nximage.nexoneu.com/en/main/box_bg.gif) repeat-y; padding:4px 12px; }
#boxM img { vertical-align:top}  
.banM1 { margin-bottom:10px; width:476px; height:149px;  background:url(http://nximage.nexoneu.com/en/main/bn_center1.gif) no-repeat  }
.banM2 { margin-bottom:10px; width:476px; height:149px;  background:url(http://nximage.nexoneu.com/en/main/bn_center2.gif) no-repeat  }
.banM3 { width:476px; height:149px;  background:url(http://nximage.nexoneu.com/en/main/bn_center3.gif) no-repeat  }
.banM1 div { padding:113px 0 0 20px;}
.banM2 div { padding:113px 0 0 20px;}
.banM3 div { padding:113px 0 0 20px;}
.Estilo6 {color: #435F88}
.Estilo7 {
    color: #FF0000;
    font-size: 10px;
}
</style>
</head>

<body>
<img src="http://nximage.nexoneu.com/en/main/box_top.gif" alt=""><br>
    <div id="boxM">
      <table border="0" cellpadding="0" cellspacing="0" width="476">
        <tbody><tr>
          <td width="233"><img src="http://www.mu-antiferna.com.ar/et.png" width="178" height="21" /></td>
        </tr>
          <tr>
            <td colspan="5" height="10"><div align="center"><font face="Arial, Helvetica, sans-serif"><span class="Estilo6">Recientemente hemos recibido su mensaje </span>: </font></div>              
              <font face="Arial, Helvetica, sans-serif"><label>
            <div align="center">
              <textarea name="textfield" style="border:1px #333333 solid; background-color:#CCCCCC;">".$mesage."</textarea>
            </div>
              </label>
            </font></td>
          </tr>
          <tr>
            <td height="10" colspan="5" class="Estilo6">-------------------------------------------------------------------------------</td>
          </tr>
          <tr>
            <td colspan="5" height="10"><div align="center" class="Estilo6"><font face="Arial, Helvetica, sans-serif">La respuesta a su FAQ es la siguiente : </font></div>
              <font face="Arial, Helvetica, sans-serif"><label></label>
                          <label>
                          <div align="center">
                            <textarea style="border:1px #333333 solid; background-color:#CECECE" name="textfield">".$respuesta."</textarea>
                                        <br /></div>
            </label>
            <span class="Estilo7">Este E-mail es atentido por los Game Master del juego. No puedes enviar un mensaje a este E-mail ya que no sera respondido. </span></font></td>
          </tr>
      </tbody></table>
    </div>
    <img src="http://nximage.nexoneu.com/en/main/box_bottom.gif" alt=""><br>
</body>
</html>
'
;
$cabeceras "Content-type: text/html\r\n";
$asunto 'Respuesta de Mu-Antiferna Atención al cliente';
mail($server,$asunto,$codigohtml,$email,$cabeceras);
echo 
'La respuesta fue enviada satisfactoriamente';
?>
Saludos =)
  #2 (permalink)  
Antiguo 25/05/2010, 13:05
Avatar de eZakto  
Fecha de Ingreso: julio-2008
Mensajes: 214
Antigüedad: 15 años, 9 meses
Puntos: 5
Respuesta: Problema con formularios

A simple vista te podría decir que esta línea:
Código PHP:
Ver original
  1. mail($server,$asunto,$codigohtml,$email,$cabeceras);
Debería ser:
Código PHP:
Ver original
  1. mail($server,$asunto,$html,$email,$cabeceras);

Ya que la variable $codigohtml no está declarada, pero $html sí.

Saludos.

Etiquetas: formulario
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:33.