Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/12/2012, 11:31
3lineas
 
Fecha de Ingreso: julio-2011
Mensajes: 113
Antigüedad: 12 años, 9 meses
Puntos: 4
formulario de contacto acorta fondo de pagina al enviar el mensaje

Hola, como andan? tengo un problema, en estahttp://www.juegoydesarrollo.com.ar/contacto.php pagina tengo un formulario que anda perfecto, el problema es que cuando envia el mensaje y aparece el cartel de "enviado correctamente" se acorta el fondo de la web un poco, y queda mal, saben como lo puedo solucionar? gracias.
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="google-site-verification" CONTENT="+nxGUDJ4QpAZ5l9Bsjdi102tLVC21AIh5d1Nl23908vVuFHs34="/>
  12. <META NAME="robots" CONTENT="index,follow">
  13. <META NAME="revisit-after" CONTENT="3 days"/>
  14. <style type="text/css">
  15. .fondoinicio {
  16.     background-image: url(imagenes/fondocontacto.jpg);
  17.     background-repeat: no-repeat;
  18.     font-family: Georgia, "Times New Roman", Times, serif;
  19.     font-size: 16px;
  20.     font-style: italic;
  21.     text-align: justify;
  22. }
  23. a:link {
  24.     color: #000;
  25.     text-decoration: none;
  26. }
  27. a:visited {
  28.     text-decoration: none;
  29.     color: #000;
  30. }
  31. a:hover {
  32.     text-decoration: none;
  33.     color: #000;
  34. }
  35. a:active {
  36.     text-decoration: none;
  37.     color: #000;
  38. }
  39. #solo {
  40.     text-align: center;
  41. }
  42. #negra {
  43.     font-weight: bold;
  44. }
  45. justificar {
  46.     text-align: justify;
  47. }
  48. .fondoinicio table tr td p {
  49.     text-align: justify;
  50. }
  51. body {
  52.     background-image: url(fondo.jpg);
  53.     background-repeat: repeat;
  54. }
  55. </style></head>
  56. <body>
  57. <?php
  58.         if(isset($_POST['boton'])){
  59.             if($_POST['nombre'] == ''){
  60.                 $error1 = '<span class="error">Ingrese su nombre</span>';
  61.             }else if($_POST['email'] == '' or !preg_match("/^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$/",$_POST['email'])){
  62.                 $error2 = '<span class="error">Ingrese un email correcto</span>';
  63.             }else if($_POST['telefono'] == ''){
  64.                 $error3 = '<span class="error">Ingrese un telefono</span>';
  65.             }else if($_POST['mensaje'] == ''){
  66.                 $error4 = '<span class="error">Ingrese un mensaje</span>';
  67.             }else{         
  68.                 $dest = "[email protected]"; //Email de destino
  69.                 $nombre = $_POST['nombre'];
  70.                 $email = $_POST['email'];
  71.                 $telefono = $_POST['telefono']; //Telefono
  72.                 $cuerpo = $_POST['mensaje']; //Cuerpo del mensaje
  73.                 //Cabeceras del correo
  74.                 $headers = "From: $nombre $email\r\n"; //Quien envia?
  75.                 $headers .= "X-Mailer: PHP5\n";
  76.                 $headers .= 'MIME-Version: 1.0' . "\n";
  77.                 $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; //
  78.                
  79.                 if(mail($dest,$telefono,$cuerpo,$headers)){
  80.                    
  81.                     $sql = "INSERT INTO `cf` (`nombre`,`email`,`telefono`,`mensaje`) VALUES ('{$_POST['nombre']}','{$_POST['email']}','{$_POST['telefono']}','{$_POST['mensaje']}')";
  82.                     $result = '<div class="result_ok">Email enviado correctamente!</div>'; 
  83.                     // si el envio fue exitoso reseteamos lo que el usuario escribio:
  84.                     $_POST['nombre'] = '';
  85.                     $_POST['email'] = '';
  86.                     $_POST['telefono'] = '';
  87.                     $_POST['mensaje'] = '';
  88.  
  89.                 }else{
  90.                     $result = '<div class="result_fail">Hubo un error al enviar el mensaje!</div>';
  91.                 }
  92.             }
  93.         }
  94.     ?>
  95. <table width="994" border="0" align="center">
  96.   <tr>
  97.     <td width="988" height="1134" valign="top" class="fondoinicio"><p><br />
  98.       <br />
  99.       <br />
  100.       <br />
  101.       <br />
  102.       <br />
  103.     </p>
  104.       <p>&nbsp;</p>
  105.       <table width="740" border="0" align="center">
  106.         <tr>
  107.           <td height="59" id="menu"><table width="740" border="0" align="center">
  108.             <tr>
  109.               <td width="93" height="35" align="center"><a href="index.html" target="_self">Inicio</a></td>
  110.               <td width="136" align="center"><a href="tallerdejuego.html" target="_self">Taller de juego</a></td>
  111.               <td width="106" align="center"><a href="educacion.html" target="_self">Educación</a></td>
  112.               <td width="73" align="center"><a href="terapia.html" target="_self">Terapia</a></td>
  113.               <td width="188" align="center"><a href="trabajoconpadres.html" target="_self">Trabajo con padres</a></td>
  114.               <td width="102" align="center"><a href="contacto.php" target="_self">Contacto</a></td>
  115.               <td width="12" align="center">&nbsp;</td>
  116.             </tr>
  117.           </table></td>
  118.         </tr>
  119.       </table>
  120.       <br />
  121.       <table width="715" border="0" align="center">
  122.         <tr>
  123.         <td class="ws_images"><div id="wowslider-container1">
  124.     <div class="ws_images"><ul>
  125. <li><img src="data1/images/10b.jpg" alt="" title="" id="wows1_0"/></li>
  126. <li><img src="data1/images/13b.jpg" alt="" title="" id="wows1_1"/></li>
  127. <li><img src="data1/images/14b.jpg" alt="" title="" id="wows1_2"/></li>
  128. <li><img src="data1/images/3b.jpg" alt="" title="" id="wows1_3"/></li>
  129. </ul></div>
  130. <div class="ws_bullets"><div>
  131. <a href="#" title="">1</a>
  132. <a href="#" title="">2</a>
  133. <a href="#" title="">3</a>
  134. <a href="#" title="">4</a>
  135. </div></div>
  136. <a class="wsl" href="http://wowslider.com">jQuery Slider Demo by WOWSlider.com v2.4</a>
  137.     <div class="ws_shadow"></div>
  138.     </div>
  139.     <script type="text/javascript" src="engine1/wowslider.js"></script>
  140.     <script type="text/javascript" src="engine1/script.js"></script>&nbsp;</td>
  141.       </tr>
  142.   </table>
  143.       <br />
  144.       <br />
  145.       <br />
  146.       <table width="589" border="0">
  147.         <tr>
  148.       <td width="35">&nbsp;</td>
  149.       <td width="544" colspan="2"><img src="imagenes/separadorarriba.png" width="547" height="74" /></td>
  150.     </tr>
  151.     <tr>
  152.       <td height="131" valign="top">&nbsp;</td>
  153.       <td><form class='contacto' method='POST' action='contacto.php'>
  154.             <div><label>Tu Nombre:</label><input type='text' class='nombre' name='nombre' value='<?php echo $_POST['nombre']; ?>'><?php echo $error1 ?></div>
  155.             <div><label>Tu Email:</label><input type='text' class='email' name='email' value='<?php echo $_POST['email']; ?>'><?php echo $error2 ?></div>
  156.             <div><label>Telefono:</label><input type='text' class='telefono' name='telefono' value='<?php echo $_POST['telefono']; ?>'><?php echo $error3 ?></div>
  157.             <div><label>Mensaje:</label><textarea rows='6' class='mensaje' name='mensaje'><?php echo $_POST['mensaje']; ?></textarea><?php echo $error4 ?></div>
  158.             <div><input type='submit' value='Envia Mensaje' class='boton' name='boton'></div>
  159.             <?php echo $result; ?>
  160.         </form></p></td>
  161.       <td valign="top"><br />
  162.         <br />
  163.         <br />
  164.         <br />
  165.         <p> />
  166.         <br />
  167.         <br />
  168.         </p>
  169.         <p><br />
  170.          <br />
  171.           <br />
  172.           </p></td>
  173.     </tr>
  174.     <tr>
  175.       <td height="44">&nbsp;</td>
  176.       <td colspan="2" valign="top"><img src="imagenes/separadorphp.png" width="547" height="42" /></td>
  177.     </tr>
  178. </table>
  179.   <br /></td>
  180.   </tr>
  181. </table>
  182. <table width="995" border="0" align="center">
  183.   <tr>
  184.     <td height="21" align="center">Pagina realizada por <a href="http://nldweb.com.ar/" target="_blank">nldweb.com.ar</a></td>
  185.   </tr>
  186. </table>
  187. </body>
  188. </html>