elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Los 10 CVE más críticos (peligrosos) de 2020


  Mostrar Temas
Páginas: [1]
1  Programación / PHP / urgente ayuda con formulario php en: 1 Diciembre 2014, 19:43 pm
Urgente alguien que me pueda ayudar con el formulario que obtuve de una plantillA WEB , estuve modificando los datos pero no me funciona de  ninguna manera no se que pueda estar mal ya que no se mucho de programación, cualquier ayuda se los agradecere.  :(

Código
  1. <?php
  2. //Type the receiever's e-mail address
  3. $emailAddress = "info@email.com";
  4. //Type your Site Name
  5. $siteName = "Company Name";
  6.  
  7. $contact_name = $_POST['name'];
  8. $contact_email = $_POST['email'];
  9. $contact_subject = $_POST['subject'];
  10. $contact_message = $_POST['message'];
  11.  
  12. if( $contact_name == true ) {
  13. $sender = $contact_email;
  14. $receiver = $emailAddress;
  15. $client_ip = $_SERVER['REMOTE_ADDR'];
  16.  
  17. $email_body = "The Name Of The Sender: $contact_name \nEmail: $sender \n\nSubject: $contact_subject
  18. \n\nMessage: \n\n$contact_message \n\nIP ADDRESS: $client_ip \n\n$siteName";
  19.  
  20. $emailAutoReply = "Hi $contact_name, \n\nWe have just received your E-Mail. We will get
  21. in touch in a few days. Thank you!  \n\n$siteName ";
  22.  
  23. $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
  24. $autoReply = "From: $receiver\r\n" . "Reply-To: $receiver \r\n" . "X-Mailer: PHP/" . phpversion();
  25.  
  26. mail( $sender, "Auto Reply: $contact_subject", $emailAutoReply, $autoReply );
  27.  
  28. if( mail( $receiver, "New E-Mail - $contact_subject", $email_body, $extra ) ) {
  29. echo "success=yes";
  30. } else {
  31. echo "success=no";
  32. }
  33. }
  34. ?>
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines