Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/06/2012, 16:54
Avatar de demoche
demoche
 
Fecha de Ingreso: junio-2006
Mensajes: 124
Antigüedad: 17 años, 10 meses
Puntos: 0
Respuesta: Problema en mensaje de suscripción

Gracia Elgoncho99, lo probe pero me tira que hay error en esta linea:

Código PHP:
mail(..); 
Como lo resuelvo?

El codigo total me quedo asi, por las dudas lo publico:

Código PHP:
<?php
if(isset($_POST['email'])) {
    
    
// EDIT THE 2 LINES BELOW AS REQUIRED
    
$email_to "[email protected]";
    
$email_subject "New e-mail subscriber";
    
    
    function 
died($error) {
        
// your error code can go here
        
echo "We are very sorry, but there were error(s) found with the form your submitted. ";
        echo 
"These errors appear below.<br /><br />";
        echo 
$error."<br /><br />";
        echo 
"Please go back and fix these errors.<br /><br />";
        die();
    }
    
    
// validation expected data exists
    
if
        (!isset(
$_POST['email'])) {
        
died('We are sorry, but there appears to be a problem with the email your submitted.');        
    }
    
    
    
$err_nombre "";
    if(
$_POST)
    {
      
/* Aca proceso los datos del post del formulario*/
      /* y valido el nombre, mail, etc */
        
if($ok)
        {
            
$error false;
            
mail(..);    
        }
        else
        {
            
$err_nombre "Debes poner mas caracteres";
            
$error true;
        }
    }
    else{
        
$error true;
    }
    if(
$error){
    
        echo
"<html>
            <head></head>
            <body>
            <form method='esta-pagina.php' method='post'>
                Nombre: <input type='text' value='"
.$err_nombre."' name='nombre'/>
                <input type='submit' value='enviar' />
            </form>
            </body>
            </html>"
;
    }

?>