Ver Mensaje Individual
  #32 (permalink)  
Antiguo 04/12/2012, 21:20
3lineas
 
Fecha de Ingreso: julio-2011
Mensajes: 113
Antigüedad: 12 años, 9 meses
Puntos: 4
Respuesta: formulario anda bien en .php pero no en .html

lo pedis lo tenes ajjaja
Código PHP:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <link rel="stylesheet" type="text/css" href="engine1/style.css" />
  5.     <script type="text/javascript" src="engine1/jquery.js"></script>
  6.    <link rel='stylesheet' href='estilos.css'>
  7.         <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'></script>
  8.         <script src='funciones.js'></script>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10. <title>Taller de psicomotricidad en caba zona oeste y zona sur - Juego y Desarrollo-</title>
  11. <META NAME="Description" CONTENT="Taller de psicomotricidad juego y desarrollo. A partir de este espacio educativo y terapéutico, nos valemos del juego como principal herramienta, dentro de un ambiente cálido y seguro, donde todo niño pueda explorar sus posibilidades, desarrollar sus fortalezas, y resolver sus dificultades, en un encuadre individual o grupal según su necesidad.>
  12. <META http-equiv="Content-Type" CONTENT="text/html; charset=iso-8859-1">
  13. <META name="keywords" CONTENT="taller de psicomotricidad, Taller de psicomotricidad en caba zona oeste y zona sur, caba, zona oeste, zona sur, taller, psicomotricidad, chicos, capacidades diferentes, niños, juego, desarrollo, espacio, educativo, expresividad, manifestaciones, necesidades, ludico, ayuda, exploración, cuerpo, actividades, educacion, aprendizaje, expresion, juego y desarrollo, terapia, tratamiento, estimulacion, sensorial, relajacion, [email protected], eugenia, trentini, licenciada, psicomotricidad, maria, noel, linsalato, [email protected], autismo, problemas de conducta, TGD, trastornos del desarrollo, hiperactividad">
  14. <META NAME="google-site-verification" CONTENT="+nxGUDJ4QpAZ5l9Bsjdi102tLVC21AIh5d1Nl23908vVuFHs34="/>
  15. <META NAME="robots" CONTENT="index,follow">
  16. <META NAME="revisit-after" CONTENT="3 days"/>
  17. <style type="text/css">
  18. .fondoinicio {
  19.     background-image: url(imagenes/fondocontacto.jpg);
  20.     background-repeat: no-repeat;
  21.     font-family: Georgia, "Times New Roman", Times, serif;
  22.     font-size: 16px;
  23.     font-style: italic;
  24.     text-align: justify;
  25. }
  26. a:link {
  27.     color: #000;
  28.     text-decoration: none;
  29. }
  30. a:visited {
  31.     text-decoration: none;
  32.     color: #000;
  33. }
  34. a:hover {
  35.     text-decoration: none;
  36.     color: #000;
  37. }
  38. a:active {
  39.     text-decoration: none;
  40.     color: #000;
  41. }
  42. #solo {
  43.     text-align: center;
  44. }
  45. #negra {
  46.     font-weight: bold;
  47. }
  48. justificar {
  49.     text-align: justify;
  50. }
  51. .fondoinicio table tr td p {
  52.     text-align: justify;
  53. }
  54. body {
  55.     background-image: url(fondo.jpg);
  56.     background-repeat: repeat;
  57. }
  58. </style></head>
  59. <link rel="shortcut icon" href="http://www.juegoydesarrollo.com.ar/logointro.ico">
  60. <body>
  61. <?php
  62.         if(isset($_POST['boton'])){
  63.             if($_POST['nombre'] == ''){
  64.                 $error1 = '<span class="error">Ingrese su nombre</span>';
  65.             }else if($_POST['email'] == '' or !preg_match("/^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$/",$_POST['email'])){
  66.                 $error2 = '<span class="error">Ingrese un email correcto</span>';
  67.             }else if($_POST['telefono'] == ''){
  68.                 $error3 = '<span class="error">Ingrese un telefono</span>';
  69.             }else if($_POST['mensaje'] == ''){
  70.                 $error4 = '<span class="error">Ingrese un mensaje</span>';
  71.             }else{         
  72.                 $dest = "[email protected]"; //Email de destino
  73.                 $nombre = $_POST['nombre'];
  74.                 $email = $_POST['email'];
  75.                 $telefono = $_POST['telefono']; //Telefono
  76.                 $cuerpo = $_POST['mensaje']; //Cuerpo del mensaje
  77.                 //Cabeceras del correo
  78.                 $headers = "From: $nombre $email\r\n"; //Quien envia?
  79.                 $headers .= "X-Mailer: PHP5\n";
  80.                 $headers .= 'MIME-Version: 1.0' . "\n";
  81.                 $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; //
  82.                
  83.                 if(mail($dest,$telefono,$cuerpo,$headers)){
  84.                    
  85.                     $sql = "INSERT INTO `cf` (`nombre`,`email`,`telefono`,`mensaje`) VALUES ('{$_POST['nombre']}','{$_POST['email']}','{$_POST['telefono']}','{$_POST['mensaje']}')";
  86.                     $result = '<div class="result_ok">Email enviado correctamente!</div>'; 
  87.                     // si el envio fue exitoso reseteamos lo que el usuario escribio:
  88.                     $_POST['nombre'] = '';
  89.                     $_POST['email'] = '';
  90.                     $_POST['telefono'] = '';
  91.                     $_POST['mensaje'] = '';
  92.  
  93.                 }else{
  94.                     $result = '<div class="result_fail">Hubo un error al enviar el mensaje!</div>';
  95.                 }
  96.             }
  97.         }
  98.     ?>
  99. <table width="994" border="0" align="center">
  100.   <tr>
  101.     <td width="988" height="1121" valign="top" class="fondoinicio"><p><br />
  102.       <br />
  103.       <br />
  104.       <br />
  105.       <br />
  106.       <br />
  107.     </p>
  108.       <p>&nbsp;</p>
  109.       <table width="740" border="0" align="center">
  110.         <tr>
  111.           <td height="59" id="menu"><table width="740" border="0" align="center">
  112.             <tr>
  113.               <td width="93" height="35" align="center"><a href="index.html" target="_self">Inicio</a></td>
  114.               <td width="136" align="center"><a href="tallerdejuego.html" target="_self">Taller de juego</a></td>
  115.               <td width="106" align="center"><a href="educacion.html" target="_self">Educación</a></td>
  116.               <td width="73" align="center"><a href="terapia.html" target="_self">Terapia</a></td>
  117.               <td width="188" align="center"><a href="trabajoconpadres.html" target="_self">Trabajo con padres</a></td>
  118.               <td width="102" align="center"><a href="contacto.php" target="_self">Contacto</a></td>
  119.               <td width="12" align="center">&nbsp;</td>
  120.             </tr>
  121.           </table></td>
  122.         </tr>
  123.       </table>
  124.       <br />
  125.       <table width="715" border="0" align="center">
  126.         <tr>
  127.         <td class="ws_images"><div id="wowslider-container1">
  128.     <div class="ws_images"><ul>
  129. <li><img src="data1/images/10b.jpg" alt="" title="" id="wows1_0"/></li>
  130. <li><img src="data1/images/13b.jpg" alt="" title="" id="wows1_1"/></li>
  131. <li><img src="data1/images/14b.jpg" alt="" title="" id="wows1_2"/></li>
  132. <li><img src="data1/images/3b.jpg" alt="" title="" id="wows1_3"/></li>
  133. </ul></div>
  134. <div class="ws_bullets"><div>
  135. <a href="#" title="">1</a>
  136. <a href="#" title="">2</a>
  137. <a href="#" title="">3</a>
  138. <a href="#" title="">4</a>
  139. </div></div>
  140. <a class="wsl" href="http://wowslider.com">jQuery Slider Demo by WOWSlider.com v2.4</a>
  141.     <div class="ws_shadow"></div>
  142.     </div>
  143.     <script type="text/javascript" src="engine1/wowslider.js"></script>
  144.     <script type="text/javascript" src="engine1/script.js"></script>&nbsp;</td>
  145.       </tr>
  146.   </table>
  147.       <br />
  148.       <br />
  149.       <br />
  150.       <table width="589" border="0">
  151.         <tr>
  152.       <td width="35">&nbsp;</td>
  153.       <td width="544" colspan="2"><img src="imagenes/separadorarriba.png" width="547" height="74" /></td>
  154.     </tr>
  155.     <tr>
  156.       <td height="131" valign="top">&nbsp;</td>
  157.       <td><form class='contacto' method='POST' action='contacto.php'>
  158.             <div><label>Tu Nombre:</label><input type='text' class='nombre' name='nombre' value='<?php echo $_POST['nombre']; ?>'><?php echo $error1 ?></div>
  159.             <div><label>Tu Email:</label><input type='text' class='email' name='email' value='<?php echo $_POST['email']; ?>'><?php echo $error2 ?></div>
  160.             <div><label>Telefono:</label><input type='text' class='telefono' name='telefono' value='<?php echo $_POST['telefono']; ?>'><?php echo $error3 ?></div>
  161.             <div><label>Mensaje:</label><textarea rows='6' class='mensaje' name='mensaje'><?php echo $_POST['mensaje']; ?></textarea><?php echo $error4 ?></div>
  162.             <div><input type='submit' value='Envia Mensaje' class='boton' name='boton'></div>
  163.             <?php echo $result; ?>
  164.         </form></p></td>
  165.       <td valign="top"><br />
  166.         <br />
  167.         <br />
  168.         <br />
  169.         <p>Eugenia Trentini<br />
  170.         Lic. en Psicomotricidad <br />
  171.         [email protected]<br />
  172.         Zona Sur y CABA</p>
  173.         <p>Maria Noel Linsalato<br />
  174.           Lic. en Psicomotricidad<br />
  175.           [email protected]<br />
  176.           Zona Oeste y CABA</p></td>
  177.     </tr>
  178.     <tr>
  179.       <td height="44">&nbsp;</td>
  180.       <td colspan="2" valign="top"><img src="imagenes/separadorphp.png" width="547" height="42" /></td>
  181.     </tr>
  182. </table>
  183.   <br /></td>
  184.   </tr>
  185. </table>
  186. <table width="995" border="0" align="center">
  187.   <tr>
  188.     <td height="21" align="center">Pagina realizada por <a href="http://nldweb.com.ar/" target="_blank">nldweb.com.ar</a></td>
  189.   </tr>
  190. </table>
  191. </body>
  192. </html>

algunos hicieron pruebas en mi formulario xq llegaron todas jajaj
igual modifique en el js tambien me parece ya no me acuerdo, un re quilombo