Ver Mensaje Individual
  #3 (permalink)  
Antiguo 15/11/2011, 10:28
cpo_icono
 
Fecha de Ingreso: noviembre-2011
Mensajes: 5
Antigüedad: 12 años, 5 meses
Puntos: 0
Respuesta: formulario php usuario incorrecto

en este mismo sitio hay un formulario en html que tiene el mismo error a continuación te envio los códigos del php y html para ver en donde esta el error

Código PHP:
style type="text/css">
<!--
.style11 {    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: small;
}
.style12 {color: #FF0000}
-->
</style>

<?php

/* Recogemos los datos del formulario, method POST y se concatenan en una variable de texto */

$message "Nombre : " $_POST['nombre'] . "\n";

$message $message "Telefono: " .$_POST['telefono']  . "\n";

$message $message "Email: " $_POST['correo'] . "\n";

$message $message "Comentarios: " $_POST['comentario'] . "\n";

 
/*  Se define al clase para enviar el correo */


class Mail
{
    
// Atributes
    
var $recipient;
    var 
$subject;
    var 
$message;
    
    
// get - set methods
    
function getMes()
    {
        return 
$this->message;
    }
    
    function 
getRec()
    {
        return 
$this->recipient;
    }
    
    function 
getSub()
    {
        return 
$this->subject;
    }

    function 
setMes$message )
    {
        
$this->message $message;
    }

    function 
setRec$recipient )
    {
        
$this->recipient $recipient;
    }
    
    function 
setSub$subject )
    {
        
$this->subject $subject;
    }
    
    function 
send()
    {
        
mail($this->recipient,$this->subject,$this->message);
    }
}

/* Se genera la variable y se establecen lso datos para el envio */

$m = new Mail();

 

//

// TODO: , Asunto y mensaje

//


$m->setRec"[email protected]);

$m->setSub"Nuevo Contacto de su sitio www.oac.com.co" );

$m->setMes$message );

$m->send();


//echo $mensaje;

?>
<script type="text/javascript">
window.location = "answer.html"
</script>
Código HTML:
 <div id="caja_textos_arriba"><form action="mail.php" method="post" name="afilia" id="afilia">
					<table width="155" border="0" align="left" cellpadding="0" cellspacing="0">
                        <tr>
                          <th scope="col"><table width="155" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                             
                            </tr>
                            <tr>
                              <td colspan="2" align="left"><span class="contenido">FORMULARIO - FORM</span></td>
                            </tr>
                            <tr>
                              <td colspan="2">
                                <div align="left" >
                                  <input name="nombre" type="text" class ="contenido_formu" id="boxes" value="Nombre | Name" size="35" />
                                </div>
                         
                                
                             </td>
                            </tr>
                           
                            <tr>
                              <td colspan="2"><div align="left" >
                                <input name="telefono" type="text"class ="contenido_formu" id="boxes" value="Teléfono | Phone"size="35" />
                              </div></td>
                            </tr>
                          
                            <tr>
                              <td colspan="2"><div align="left" >
                                <input name="correo" type="text" class ="contenido_formu" id="boxes" value="E-mail:" size="35" />
                              </div></td>
                            </tr>
                          
                            <tr valign="top">
                              <td colspan="2" align="left"><div id="box_biggie"  >
                                <textarea  name = "comentario" cols ="1" rows = "1" class="contenido_formu" id="box_com"
                                 style="margin-top:5px">Comentarios | Message:</textarea>
                              </div></td>
                            </tr>
                          
                            <tr>
                              <td width="80" align="left" ><input type="submit" name="Submit" value="Enviar" class= "contenido_formu" id="campo_elias" style="margin-top:5px"/></td>
                              <td width="75" align="left" ><input type="reset" name="Submit2" value="Borrar" class= "contenido_formu" id="campo_elias" style="margin-top:5px"
                              /></td>
                            </tr>
                            <tr>
                              
                            </tr>
                          </table></th>
                        </tr>
                    </table>
					</form>
         </div> 
te agradezco mucho la colaboración