Tema: Email form
Ver Mensaje Individual
  #9 (permalink)  
Antiguo 03/12/2003, 01:31
Avatar de OooH-Boy
OooH-Boy
 
Fecha de Ingreso: marzo-2002
Mensajes: 70
Antigüedad: 22 años, 1 mes
Puntos: 0
Hola, gracias por la ayuda pero estoy en la luna un poco csi no se de PHP estoy aprendiendo y lo que necesecito es un codigo si tienes donde pueda mandar los mensages y me de las gracias y cuando hay un error .... que me diga que lso campos estan vacios.

tengo un nuevo codigo me funciona muy bien pero es bien sencillo...

<?

// ------------- CONFIGURABLE SECTION ------------------------

// $mailto - set to the email address you want the form

$mailto = '[email protected]' ;

// $subject - set to the Subject line of the email, eg

$subject = "Feedback Fron the web" ;

// the pages to be displayed, eg
$formurl = "http://p-killer/php/feedback.htm" ;
$errorurl = "http://p-killer/php/error.htm" ;
$thankyouurl = "http://p-killer/php/thankyou.htm" ;

// -------------------- END OF CONFIGURABLE SECTION ---------------

$name = $_POST['name'] ;
$ministerio = $_POST['ministerio'] ;
$ciudad = $_POST['ciudad'] ;
$tel = $_POST['tel'] ;
$email = $_POST['email'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );

if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
}

$messageproper =

"This message was sent from:\n" .
"$http_referrer\n" .
" Nombre:$name\n" .
" Ministerio:$ministerio\n" .
"Ciudad/Pais:$ciudad\n" .
" Tel:$tel\n" .
" Email:$email\n" .
"------------------------- COMMENTS -------------------------\n\n" .
$comments .
"\n\n------------------------------------------------------------\n" ;

mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\nReply-To: \"$name\" <$email>\nX-Mailer: chfeedback.php 2.01" );
header( "Location: $thankyouurl" );
exit ;

?>


Tienes alguno bueno completo que pueda usar..gracias..