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

 

 


Tema destacado: Entrar al Canal Oficial Telegram de elhacker.net


  Mostrar Mensajes
Páginas: 1 2 3 4 [5] 6 7 8
41  Programación / Desarrollo Web / Certificado SSL en xmapp en: 28 Mayo 2017, 22:29 pm
Hola buenas.

Despues de ver no se cuantos videos y manuales, no soy capaz de instalar un certificado SSl a mi web que esta en mi servidor en win7 en xampp.

Un Saludo.
42  Programación / Desarrollo Web / Importancia de las extensiones en los dominios en: 27 Mayo 2017, 22:21 pm
Hola buenas.

No me acabo de aclarar en la importancia de la extension en un dominio en tu web, ejemplo:

 pepelopez.es  pepelopez.com pepelopez.org o pepelopez.tk  ???

Salud2.


43  Programación / PHP / Re: Ayuda Problema formulario de correo en Xampp en: 27 Mayo 2017, 20:03 pm
bueno ahora solo ya me muestra esta :

Notice: Undefined variable: email_message in C:\xampp\htdocs\Emeil xxxxxx\send from para adjuntar archivos\send_form_email.php on line 66

Y DEJAR ESTA ULTIMA ????

El mensaje fue enviado


Salud2.
por fin solucionado, de esta forma:

$email_message .= "First Name: ".clean_string($first_name)."<br>\n";

quito el punto y solucionado

$email_message = "First Name: ".clean_string($first_name)."<br>\n";

Salud2.


· No hacer doble post
>aquí las reglas del foro
-Engel Lex
44  Programación / PHP / Re: Ayuda Problema formulario de correo en Xampp en: 27 Mayo 2017, 14:50 pm
bueno logre mandar y recibir los correos, pero se queda clavado ete mesaje en la pantalla del pc que hace referencia parece ser a un error en send_form_emeil en la line 66 y 99:

Notice: Undefined variable: email_message in C:\xampp\htdocs\Emeil XXXX\send from para adjuntar archivos\send_form_email.php on line 66
2017-05-27 12:41:52 Connection: opening to smtp.mail.yahoo.com:587, timeout=300, options=array ( ) 2017-05-27 12:41:52 Connection: opened 2017-05-27 12:41:52 SERVER -> CLIENT: 220 smtp.mail.yahoo.com ESMTP ready 2017-05-27 12:41:52 CLIENT -> SERVER: EHLO stapolavacaciones.tk 2017-05-27 12:41:52 SERVER -> CLIENT: 250-smtp.mail.yahoo.com 250-PIPELINING 250-SIZE 41697280 250-8 BITMIME 250 STARTTLS 2017-05-27 12:41:52 CLIENT -> SERVER: STARTTLS 2017-05-27 12:41:52 SERVER -> CLIENT: 220 2.0.0 Start TLS 2017-05-27 12:41:52 CLIENT -> SERVER: EHLO XXXXXXXXX.tk 2017-05-27 12:41:52 SERVER -> CLIENT: 250-smtp.mail.yahoo.com 250-PIPELINING 250-SIZE 41697280 250-8 BITMIME 250 AUTH PLAIN LOGIN XOAUTH2 XYMCOOKIE OAUTHBEARER 2017-05-27 12:41:52 CLIENT -> SERVER: AUTH LOGIN 2017-05-27 12:41:53 SERVER -> CLIENT: 334 VXNlcm5hbWU6 2017-05-27 12:41:53 CLIENT -> SERVER: ZXVnZW5pb2NvbF8wM0B5YWhvby5lcw== 2017-05-27 12:41:53 SERVER -> CLIENT: 334 UGFzc3dvcmQ6 2017-05-27 12:41:53 CLIENT -> SERVER: MjUwNnlpbXk= 2017-05-27 12:41:53 SERVER -> CLIENT: 235 2.0.0 OK 2017-05-27 12:41:53 CLIENT -> SERVER: MAIL FROM: 2017-05-27 12:41:53 SERVER -> CLIENT: 250 OK , completed 2017-05-27 12:41:53 CLIENT -> SERVER: RCPT TO: 2017-05-27 12:41:53 SERVER -> CLIENT: 250 OK , completed 2017-05-27 12:41:53 CLIENT -> SERVER: RCPT TO: 2017-05-27 12:41:53 SERVER -> CLIENT: 250 OK , completed 2017-05-27 12:41:53 CLIENT -> SERVER: DATA 2017-05-27 12:41:53 SERVER -> CLIENT: 354 Start Mail. End with CRLF.CRLF 2017-05-27 12:41:53 CLIENT -> SERVER: Date: Sat, 27 May 2017 14:41:52 +0200 2017-05-27 12:41:53 CLIENT -> SERVER: To: Eugenio , XXXXXXXX@gmail.com 2017-05-27 12:41:53 CLIENT -> SERVER: From: Mi web 2017-05-27 12:41:53 CLIENT -> SERVER: Subject: Desde mi web 2017-05-27 12:41:53 CLIENT -> SERVER: Message-ID: <01fd3aea46b9cea9ca4c0bc7d98d6b23@XXXXXXXXXXXXXXX.tk> 2017-05-27 12:41:53 CLIENT -> SERVER: X-Mailer: PHPMailer 5.2.23 (https://github.com/PHPMailer/PHPMailer) 2017-05-27 12:41:53 CLIENT -> SERVER: MIME-Version: 1.0 2017-05-27 12:41:53 CLIENT -> SERVER: Content-Type: multipart/alternative; 2017-05-27 12:41:53 CLIENT -> SERVER: boundary="b1_01fd3aea46b9cea9ca4c0bc7d98d6b23" 2017-05-27 12:41:53 CLIENT -> SERVER: Content-Transfer-Encoding: 8bit 2017-05-27 12:41:53 CLIENT -> SERVER: 2017-05-27 12:41:53 CLIENT -> SERVER: This is a multi-part message in MIME format. 2017-05-27 12:41:53 CLIENT -> SERVER: 2017-05-27 12:41:53 CLIENT -> SERVER: --b1_01fd3aea46b9cea9ca4c0bc7d98d6b23 2017-05-27 12:41:53 CLIENT -> SERVER: Content-Type: text/plain; charset=us-ascii 2017-05-27 12:41:53 CLIENT -> SERVER: 2017-05-27 12:41:53 CLIENT -> SERVER: First Name: TRENOOOOOOOOOO
2017-05-27 12:41:53 CLIENT -> SERVER: Last Name: GGGGGGGGG
2017-05-27 12:41:53 CLIENT -> SERVER: Email: XXXXXXXXXXyahoo.es
2017-05-27 12:41:53 CLIENT -> SERVER: Telephone:
2017-05-27 12:41:53 CLIENT -> SERVER: Comments: VVVVVVVVVVVVVVV
2017-05-27 12:41:53 CLIENT -> SERVER: 2017-05-27 12:41:53 CLIENT -> SERVER: 2017-05-27 12:41:53 CLIENT -> SERVER: --b1_01fd3aea46b9cea9ca4c0bc7d98d6b23 2017-05-27 12:41:53 CLIENT -> SERVER: Content-Type: text/html; charset=us-ascii 2017-05-27 12:41:53 CLIENT -> SERVER: 2017-05-27 12:41:53 CLIENT -> SERVER: First Name: TRENOOOOOOOOOO
2017-05-27 12:41:53 CLIENT -> SERVER: Last Name: GGGGGGGGG
2017-05-27 12:41:53 CLIENT -> SERVER: Email: XXXXXXXXXX@yahoo.es
2017-05-27 12:41:53 CLIENT -> SERVER: Telephone:
2017-05-27 12:41:53 CLIENT -> SERVER: Comments: VVVVVVVVVVVVVVV
2017-05-27 12:41:53 CLIENT -> SERVER: 2017-05-27 12:41:53 CLIENT -> SERVER: 2017-05-27 12:41:53 CLIENT -> SERVER: 2017-05-27 12:41:53 CLIENT -> SERVER: --b1_01fd3aea46b9cea9ca4c0bc7d98d6b23-- 2017-05-27 12:41:53 CLIENT -> SERVER: 2017-05-27 12:41:53 CLIENT -> SERVER: . 2017-05-27 12:41:53 SERVER -> CLIENT: 250 OK , completed 2017-05-27 12:41:53 CLIENT -> SERVER: QUIT 2017-05-27 12:41:53 SERVER -> CLIENT: 221 Service Closing transmission 2017-05-27 12:41:53 Connection: closed El mensaje fue enviado
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\Emeil XXXX\send from para adjuntar archivos\PHPMailer-master\class.smtp.php:244) in C:\xampp\htdocs\Emeil XXX\send from para adjuntar archivos\send_form_email.php on line 99

Salud2.
45  Programación / PHP / Re: Ayuda Problema formulario de correo en Xampp en: 26 Mayo 2017, 21:04 pm
S.O WIN 7

He seguido trasteando con videos pero la verdad ya no se por dónde me ando, mientras no logre configurar en condiciones en  xampp.

Ahora me da este error:
Warning: require(PHPMailer-master/PHPMailerAutoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\Emeil xxxxx\send from para adjuntar archivos\send_form_email.php on line 28

Fatal error: require(): Failed opening required 'PHPMailer-master/PHPMailerAutoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\Emeil xxxxx\send from para adjuntar archivos\send_form_email.php on line 28

Salud2.
46  Programación / PHP / Ayuda Problema formulario de correo en Xampp en: 25 Mayo 2017, 21:52 pm
Hola buenas.

Soy nuevo en esto de Xampp, pero bueno ya veo mi web en internet después de muchos bandazos.
El problema que tengo ahora es en el formulario de contacto al mandarlo me da este error antes configure el php.ini pero nada.

¡Objeto no localizado!
No se ha localizado la URL solicitada en este servidor. La URL de la página que le ha remitido parece ser errónea o estar obsoleta. Por favor, informe del error al autor de esa página.
Si usted cree que esto es un error del servidor, por favor comuníqueselo al administrador del portal.
Error 404
xxxxxxxx.tk
Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.5.30

Un Saludo.
47  Programación / PHP / Re: Ayuda en formulario de contacto en: 20 Mayo 2017, 15:10 pm
Bueno pon el código que tienes para que podamos ayudarte por que, que un formulario funcione en un hosting y en otro hosting no funcione es muy raro será la configuración de la base de datos o no se. Pega el código para que podamos ayudarte

ste es html :

Código
  1. <!doctype html5>
  2. <html lang="es">
  3.    <head>  
  4.        <title>email</title>                
  5.        <meta name="viewport" content="width=device-width; user-scalable=no; initial-scale=1; maximun-scale=1; minimun-scale=1">
  6. </head>
  7.  
  8.    <body>
  9. body {
  10. background-color: lightcyan;
  11. }
  12. input:required:invalid, textarea:required:invalid {
  13. border: 2px solid red;
  14. border-radius:5px;
  15. background: #E983CC;
  16. }
  17. input:required:valid, textarea:required:valid {
  18. border: 2px solid green;
  19. border-radius:5px;
  20. background: white;
  21. }
  22. input:invalid {
  23. border: 2px solid red;
  24. border-radius:5px;
  25. background: #E983CC;
  26. }
  27. input:valid {
  28. border: 2px solid green;
  29. border-radius:5px;
  30. background: white;
  31. }
  32. .boton {
  33. color: green;
  34. background-color:lightblue;
  35. }
  36.    <form name="contactform" method="post" action="email.php">
  37. <table width="360px">
  38. <tr>
  39. <td></td>
  40. <td>
  41. <h1>Contacto</h1>
  42. </td>
  43. </tr>
  44. <tr>
  45. <td valign="top">
  46.  <label for="first_name">Nombre *</label>
  47. </td>
  48. <td valign="top">
  49.  <input  title="Se necesita un nombre" type="text" name="first_name" maxlength="50" size="22" pattern="[a-zA-Zàáâäãå&#261;&#269;&#263;&#281;èéêë&#279;&#303;ìíîï&#322;&#324;òóôöõøùúûü&#371;&#363;ÿý&#380;&#378;ñç&#269;šžÀÁÄÃÅ&#260;&#262;&#268;&#278;&#280;ÈÉÊËÌÍÎÏ&#302;&#321;&#323;ÒÓÔÖÕØÙÚÛÜ&#370;&#362;ŸÝ&#379;&#377;ÑßÇŒÆ&#268;ŠŽ&#8706;ð ,.'-]{3,30}" required>
  50. </td>
  51. </tr>
  52. <tr>
  53. <td valign="top"">
  54.  <label for="last_name">Apellido *</label>
  55. </td>
  56. <td valign="top">
  57.  <input title="Se necesita un nombre" type="text" name="last_name" maxlength="50" size="22" pattern="[^0-9·]{3,30}" required>
  58. </td>
  59. </tr>
  60. <tr>
  61. <td valign="top">
  62.  <label for="email">Email *</label>
  63. </td>
  64. <td valign="top">
  65.  <input title="Se necesita un correo valido" type="email" name="email" maxlength="80" size="22" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$" required>
  66. </td>
  67. </tr>
  68. <tr>
  69. <td valign="top">
  70.  <label for="telephone ">Telefono</label>
  71. </td>
  72. <td valign="top">
  73.  <input  title="Se necesita un numero telefonico"type="text" name="telephone" maxlength="30" size="22" pattern="[0-9]{8,}">
  74. </td>
  75. </tr>
  76. <tr>
  77. <td valign="top">
  78.  <label for="comments">Mensaje *</label>
  79. </td>
  80. <td valign="top">
  81.  <textarea name="comments" minlength="8" maxlength="1000" cols="36" rows="6" required></textarea>
  82. </td>
  83. </tr>
  84. <tr>
  85. <td colspan="2" style="text-align:center">
  86.  <input class="boton" type="submit" value="Enviar">   <a href="https://xxxxxxxxxxxxxx.es"><b>Inicio Web</b></a>
  87. </td>
  88. </tr>
  89. </form>
  90.  
  91. </body>
  92. </htlm>
  93.  
  94.  
  95.  

y el sen_from_email.php

Código
  1. <?php
  2. /* Parametros para varios servidores
  3. HOTMAIL
  4. $smtp->SMTPAuth   = true;
  5. $smtp->SMTPSecure = "tls";
  6. $smtp->Host       = "smtp.live.com";
  7. $smtp->Username   = "miCuenta@outlook.com";
  8. $smtp->Password   = "miPassword";
  9. $smtp->Port       = 25;
  10.  
  11. GMAIL
  12. $smtp->SMTPAuth   = true;
  13. $smtp->SMTPSecure = "tls";
  14. $smtp->Host       = "smtp.gmail.com";
  15. $smtp->Username   = "miCuenta@gmail.com";
  16. $smtp->Password   = "miPassword";
  17. $smtp->Port       = 587;
  18.  
  19. YAHOO
  20. $smtp->SMTPAuth   = true;
  21. $smtp->SMTPSecure = "ssl";
  22. $smtp->Host       = "smtp.mail.yahoo.com";
  23. $smtp->Username   = "miCuenta@yahoo.com";
  24. $smtp->Password   = "miPassword";
  25. $smtp->Port       = 465;
  26. */
  27.  
  28. require 'PHPMailer-master/PHPMailerAutoload.php';
  29.  
  30. $mail = new PHPMailer;
  31.  
  32. // $mail->SMTPDebug = 3; // Enable verbose debug output
  33.  
  34. $enviar2 = '';
  35.  
  36. // Configurar el servidor, cambiar solo email y paasword si es de yahoo.
  37. $mail->isSMTP();                             // Set mailer to use SMTP
  38. $mail->Host = 'smtp.mail.yahoo.com';         // Specify main and backup SMTP servers
  39. $mail->SMTPAuth = true;                      // Enable SMTP authentication
  40. $mail->Username = 'xxxxxxxxxx@yahoo.es';  // SMTP username
  41. $mail->Password = 'xxxxxxxxx';               // SMTP password
  42. $mail->SMTPSecure = 'tls';                   // Enable TLS encryption, `ssl` also accepted
  43. $mail->Port = 587;                           // TCP port to connect to
  44.  
  45. // Parametros para configurar
  46. $correo = 'xxxxxxxxxxxxx@yahoo.es';
  47. $mailer = 'Mi web';
  48. $enviar1 = 'xxxxxxxxxxxxx@yahoo.es'; // Obligatorio
  49. $enviar2 = 'xxxxxxxx@gmail.com';  //Opcional, si no se usa dejar vacio entre ''
  50. $asunto = 'xxxxxxxxxxxx';
  51.  
  52. //**********************************************//
  53. // Parametros de mail.html, no tocar nada       //
  54. //**********************************************//
  55.  
  56. $first_name = $_POST['first_name']; // required
  57.    $last_name = $_POST['last_name']; // required
  58.    $email_from = $_POST['email']; // required
  59.    $telephone = $_POST['telephone']; // not required
  60.    $comments = $_POST['comments']; // required
  61.  
  62.    function clean_string($string) {
  63.      $bad = array("content-type","bcc:","to:","cc:","href");
  64.      return str_replace($bad,"",$string);
  65.    }
  66.    $email_message .= "First Name: ".clean_string($first_name)."<br>\n";
  67.    $email_message .= "Last Name: ".clean_string($last_name)."<br>\n";
  68.    $email_message .= "Email: ".clean_string($email_from)."<br>\n";
  69.    $email_message .= "Telephone: ".clean_string($telephone)."<br>\n";
  70.    $email_message .= "Comments: ".clean_string($comments)."<br>\n";
  71.  
  72. // envio de correo
  73. $mail->Sender=$correo;
  74. $mail->setFrom($correo, $mailer);
  75. $mail->addAddress($enviar1, 'Eugenio');     // Add a recipient
  76. if (!empty($enviar2)) {
  77. $mail->addAddress($enviar2, ''); // Name is optional
  78. }
  79.  
  80. // $mail->addReplyTo('info@example.com', 'Information');
  81. // $mail->addCC('cc@example.com');
  82. // $mail->addBCC('bcc@example.com');
  83.  
  84. // $mail->addAttachment('/var/tmp/file.tar.gz');         // Add attachments
  85. // $mail->addAttachment('/tmp/image.jpg', 'new.jpg');    // Optional name
  86. $mail->isHTML(true);                                  // Set email format to HTML
  87.  
  88. $mail->Subject = $asunto;
  89. $mail->Body    = $email_message;
  90. $mail->AltBody = $email_message;
  91.  
  92. if(!$mail->send()) {
  93.    echo 'Mensaje sin enviar.';
  94.    echo 'Mailer Error: ' . $mail->ErrorInfo;
  95.    phpAlert("Mensaje sin enviar!\\n\\nPHP has got an Alert Box");
  96. } else {
  97.    echo 'El mensaje fue enviado';
  98.    phpAlert("Mensaje enviado!\\n\\n");
  99.    header ('Refresh: 5; URL=email.html');
  100. }
  101. function phpAlert($msg) {
  102.    echo '<script type="text/javascript">alert("' . $msg . '")</script>';
  103. }
  104.  

Y después esta la carpeta PHPMailer-Master pero de esta yo no he tocado nada

Un Saludo.
48  Programación / PHP / Re: Ayuda en formulario de contacto en: 19 Mayo 2017, 21:25 pm
por que no va?

si funciona funciona, si no te funciona en otro hosting, el problema casi seguro no es el hosting sino tu

Pues por eso posteo en el foro para conseguir un formulario de contacto no conflictivo.

Salud2.
49  Programación / PHP / Ayuda en formulario de contacto en: 19 Mayo 2017, 20:44 pm
Hola buenas.

Necesitaria un formulario de contacto que funcione en condiciones, tengo varios uno me funciona ok alojado en una web gratuita pero en otra de pago no va pufffff .

Salud2.
50  Programación / PHP / Ayuda en formulario de contacto en: 16 Mayo 2017, 21:40 pm
Hola buenas.

Acabo de crear un formulario de contacto php html y detecto como pruebas que estoy haciendo que cuando en el campo de email se escribe algún correo que no sea Gmail no recibo la solicitud, he cambiado en el archivo send_from_email.php  la recepción de correo de yahoo a Gmail y este no es el problema.

 emeail.html

configuracion email.html
Código
  1. <!doctype htlm>
  2. <html lang="es">
  3.    <head>  
  4.        <title>email</title>                  
  5.        <link rel="stylesheet" type="text/css" href="email_general.css">                            
  6.        <meta name="viewport" content="width=device-width; user-scalable=no; initial-scale=1; maximun-scale=1">
  7. </head>
  8.  
  9.    <body>
  10. <br>
  11. <br>
  12. <ul class="flex-container1">
  13. <li class="item1" id="item">
  14.   <form><b>Rellenar todos los campos obligatorios *</b></form>
  15.   <form><b>antes de mandar el email.</b></form>
  16. <br>  
  17.     <form name="contactform" method="post" action="send_form_email.php">
  18. <table width="70%"> <!-- 330 PX; -->
  19. <tr>
  20. <td valign="top">
  21.  <label for="first_name">Nombre*</label>
  22. </td>
  23. <td valign="top">
  24.  <input  type="text" name="first_name" maxlength="50" size="24">
  25. </td>
  26. </tr>
  27. <tr>
  28. <td valign="top"">
  29.  <label for="last_name">Apellidos*</label>
  30. </td>
  31. <td valign="top">
  32.  <input  type="text" name="last_name" maxlength="50" size="24">
  33. </td>
  34. </tr>
  35. <tr>
  36. <td valign="top">
  37.  <label for="email">Email*</label>
  38. </td>
  39. <td valign="top">
  40.  <input  type="text" name="email" maxlength="80" size="24">
  41. </td>
  42. </tr>
  43. <tr>
  44. <td valign="top">
  45.  <label for="telephone">Telefono*</label>
  46. </td>
  47. <td valign="top">
  48.  <input  type="text" name="telephone" maxlength="30" size="24">
  49. </td>
  50. </tr>
  51. <tr>
  52. <td valign="top">
  53.  <label for="comments">Commentario*</label>
  54. </td>
  55. <td valign="top">
  56.  <textarea  name="comments" maxlength="1000" cols="25" rows="10"></textarea>
  57. </td>
  58. </tr>
  59. <tr>
  60. <td colspan="2" style="text-align:center">
  61.  <input type="submit" value="Enviar">   <a href="https://xxxxxxxxxxxxxxx.es"><b>Web Inicio</b></a>
  62. </td>
  63. </tr>
  64. </form>
  65.    </li>
  66.  
  67. </body>
  68. </htlm>
  69.  
  70.  
  71.  
  72.  

codigo php

Código
  1. <?php
  2. if(isset($_POST['email'])) {
  3.  
  4.    // EDIT THE 2 LINES BELOW AS REQUIRED
  5.    $email_to = "xxxxxxxxxxxx@yahoo.es"; /*you@yourdomain.com */
  6.    $email_subject = "xxxxxxxxxxxxxx"; /*Your email subject line */
  7.  
  8.    function died($error) {
  9.        // your error code can go here
  10.        echo "We are very sorry, but there were error(s) found with the form you submitted. ";
  11.        echo "These errors appear below.<br /><br />";
  12.        echo $error."<br /><br />";
  13.        echo "Please go back and fix these errors.<br /><br />";
  14.        die();
  15.    }
  16.  
  17.  
  18.    // validation expected data exists
  19.    if(!isset($_POST['first_name']) ||
  20.        !isset($_POST['last_name']) ||
  21.        !isset($_POST['email']) ||
  22.        !isset($_POST['telephone']) ||
  23.        !isset($_POST['comments'])) {
  24.        died('We are sorry, but there appears to be a problem with the form you submitted.');      
  25.    }
  26.  
  27.  
  28.  
  29.    $first_name = $_POST['first_name']; // required
  30.    $last_name = $_POST['last_name']; // required
  31.    $email_from = $_POST['email']; // required
  32.    $telephone = $_POST['telephone']; // not required
  33.    $comments = $_POST['comments']; // required
  34.  
  35.    $error_message = "";
  36.    $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
  37.  
  38.  if(!preg_match($email_exp,$email_from)) {
  39.    $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
  40.  }
  41.  
  42.    $string_exp = "/^[A-Za-z .'-]+$/";
  43.  
  44.  if(!preg_match($string_exp,$first_name)) {
  45.    $error_message .= 'The First Name you entered does not appear to be valid.<br />';
  46.  }
  47.  
  48.  if(!preg_match($string_exp,$last_name)) {
  49.    $error_message .= 'The Last Name you entered does not appear to be valid.<br />';
  50.  }
  51.  
  52.  if(strlen($comments) < 2) {
  53.    $error_message .= 'The Comments you entered do not appear to be valid.<br />';
  54.  }
  55.  
  56.  if(strlen($error_message) > 0) {
  57.    died($error_message);
  58.  }
  59.  
  60.    $email_message = "Form details below.\n\n";
  61.  
  62.  
  63.    function clean_string($string) {
  64.      $bad = array("content-type","bcc:","to:","cc:","href");
  65.      return str_replace($bad,"",$string);
  66.    }
  67.  
  68.  
  69.  
  70.    $email_message .= "First Name: ".clean_string($first_name)."\n";
  71.    $email_message .= "Last Name: ".clean_string($last_name)."\n";
  72.    $email_message .= "Email: ".clean_string($email_from)."\n";
  73.    $email_message .= "Telephone: ".clean_string($telephone)."\n";
  74.    $email_message .= "Comments: ".clean_string($comments)."\n";
  75.  
  76. // create email headers
  77. $headers = 'From: '.$email_from."\r\n".
  78. 'Reply-To: '.$email_from."\r\n" .
  79. 'X-Mailer: PHP/' . phpversion();
  80. @mail($email_to, $email_subject, $email_message, $headers);  
  81. ?>
  82.  
  83. <!-- include your own success html here -->
  84.  
  85. Gracias por contactarnos. Estaremos en contacto con usted muy pronto.
  86.  
  87. <?php
  88.  
  89. }
  90. ?>

Salud2.
Páginas: 1 2 3 4 [5] 6 7 8
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines