Ver Mensaje Individual
  #2 (permalink)  
Antiguo 19/03/2011, 12:44
Vaizen
 
Fecha de Ingreso: marzo-2011
Mensajes: 2
Antigüedad: 13 años, 1 mes
Puntos: 0
formulario de contacto error usuario siempre

Perdon por el doble post pero no me cupo todo el codigo xD

el send.php
Código PHP:
<?php

//Prefedined Variables
$to "[email protected]";
$subject "Contact from your website.";

if(
$_POST) {
    
// Collect POST data from form
    
$name stripslashes($_POST['name']);
    
$email stripslashes($_POST['email']);
    
$comment stripslashes($_POST['comment']);

    
// Define email variables
    
$message date('d/m/Y')."\n" $name " (" $email ") sent the following comment:\n" $comment;
    
$headers 'From: '.$email.'\r\n\'Reply-To: ' $email '\r\n\'X-Mailer: PHP/' phpversion();
    
    
//Validate
    
$header_injections preg_match("(\r|\n)(to:|from:|cc:|bcc:)"$comment);
    
    if( ! empty(
$name) && ! empty($email) && ! empty($comment) && ! $header_injections ) {
        if( 
mail($to$subject$message$headers) ) {
            return 
true;
        }
        else {
            return 
false;
        }
    }
    else {
        return 
false;
    }
}
?>
y dejo el CSS por si hace falta

CSS

Código CSS:
Ver original
  1. /* CSS Document */
  2.  
  3. body {
  4. margin:0px;
  5. padding: 0px;
  6. }
  7.  
  8. #wrapper {
  9. width: 100%;
  10. margin-top: 0px;
  11. margin:auto;
  12. background: url(Images/bgwrap.jpg);
  13.  
  14. }
  15.  
  16. #header_wrap{
  17.     position: relative;
  18.     width: 100%;
  19.     height:200px;
  20.     margin:auto;
  21.     background-image: url(Images/bkgd.png);
  22.     background-repeat: repeat-x;
  23.     background-position:center center;
  24. }
  25.  
  26. #header{
  27.     width:1100px;
  28.     height:200px;
  29.     margin:auto;
  30.     background-image: url(Images/alexei.png);
  31.     background-repeat: no-repeat;
  32.     background-position: center center;
  33. }
  34.  
  35. #main {
  36. width:1100px;
  37. margin:auto;
  38. overflow:hidden;
  39. clear:none;
  40.  
  41. }
  42.      #portfolio{
  43.     width:1000px;
  44.     height:650px;
  45.     margin:auto;
  46.    
  47.     }
  48.  
  49.     #quotes{
  50.     height:350px;
  51.     width:1100px;
  52.     margin:auto;
  53.         }
  54.  
  55.         #intro {
  56.         width:1100px;
  57.         height:25px;
  58.        
  59.         }
  60.         #quote1{
  61.     float:left;
  62.     width:300px;
  63.     height:300px;
  64.     margin-bottom:25px;
  65.     margin-left:50px;
  66.    
  67.        
  68.         }
  69.  
  70.         #quote2{
  71.     float:left;
  72.     width:300px;
  73.     height:300px;
  74.     margin-bottom:25px;
  75.     margin-left:50px;
  76.    
  77.        
  78.         }
  79.  
  80.        
  81.         #quote1 p{
  82.             font-family:"garamond", "Times New Roman", Times, serif;
  83.             font-style:italic;
  84.             padding: 20px;
  85.             font-size:25px;
  86.             margin-top:0;
  87.                        
  88.             }
  89.            
  90.         #quote2 p{
  91.             font-family:"garamond", "Times New Roman", Times, serif;
  92.             font-style:italic;
  93.             padding: 20px;
  94.             font-size:25px;
  95.             margin-top:0;
  96.                        
  97.             }
  98.            
  99.         #quote3 p{
  100.             font-family: "calibri", Arial, Helvetica, sans-serif;  
  101.             font-size:15px;
  102.             margin-top:0;
  103.             text-align:right;
  104.                        
  105.             }
  106.            
  107.         #quotes h2{
  108.             font-family:  "calibri", Verdana, Geneva, sans-serif;
  109.             font-size:20px;
  110.             padding:10px;
  111.             color: #003366;
  112.             text-shadow: 0px 2px 1px white;
  113.             margin-top:0;
  114.             line-height:2px;
  115.             text-align:right;
  116.            
  117.             }
  118.        
  119.     #footer_wrap{
  120.     background-image: url(Images/footerbg.png);
  121.     background-repeat: repeat-x;
  122.     background-position:center center;
  123.     height:250px;
  124.     width:100%;
  125.     line-height:2em;
  126.    
  127.     }
  128.  
  129.         #footer{
  130.         height:100px;
  131.         width:1100px;
  132.         margin:auto;
  133.        
  134. }
  135.             #footer p{
  136.             font-family:helvetica, arial, verdana, sans-serif;
  137.             font-size:12px;
  138.             text-align:center;
  139.             color:white;
  140.             margin-top:0;
  141.             padding-top:15px;
  142.             text-shadow: 0px 2px 1px black;
  143.  
  144.  
  145.  
  146. }
  147. /* CSS Contact Form */
  148.  
  149. #container {
  150.     float:left;
  151.     width:300px;
  152.     height:300px;
  153.     margin-bottom:25px;
  154.     margin-left:50px;
  155.     border:none;
  156.    
  157.     }
  158.      
  159.     /*contact form*/
  160.     #mask {
  161.     background-color:#000;
  162.     display:none;
  163.     left:0;
  164.     position:absolute;
  165.     top:0;
  166.     width:100%;
  167.     height:1450px;
  168.     z-index:9000;
  169.     }
  170.      
  171.     #contact {
  172.     background:url(Images/bgwrap.jpg);
  173.     display:none;
  174.     left:50%;
  175.     margin-left:-300px;
  176.     position:absolute;
  177.     top:90px;
  178.     width:600px;
  179.     z-index:9999;
  180.     border-radius:10px;
  181.     -moz-border-radius:10px;
  182.     -webkit-border-radius:10px;
  183.     padding:20px 20px 0px;
  184.     }
  185.     #social {
  186.     width:200px;
  187.     position:absolute;
  188.     left:370px;
  189.     top:120px;
  190.     padding-left:30px;
  191.     border-left: 2px solid #663333;
  192.     border-radius:10px;
  193.     -moz-border-radius:10px;
  194.     -webkit-border-radius:10px;
  195. }
  196. #email2 {
  197.     font-family: Verdana, Geneva, sans-serif;
  198.     font-size:10pt;
  199.     font-style:italic;
  200.     text-align:left;
  201.     color: #663333;
  202.     }
  203. #email2 h3 {
  204.     font-family: "Courier New", Courier, monospace;
  205.     font-size:14pt;
  206.     font-style:normal;
  207.    
  208.     }
  209.  
  210.      
  211.     #close {
  212.     background:url(Images/close.png) no-repeat right;
  213.     cursor:pointer;
  214.     height:24px;
  215.     width:24px;
  216.     position:relative;
  217.     left:605px;
  218.     bottom:30px;
  219.     }
  220.      
  221.     #contact_header {
  222.     background:url(Images/contact_header.png) no-repeat left;
  223.     font-family:arial, sans-serif;
  224.     font-size:30px;
  225.     font-weight:700;
  226.     line-height:50px;
  227.     padding:5px 5px 10px 60px;
  228.     height:40px;
  229.     }
  230.      
  231.     /* form components */
  232.     input,textarea {
  233.     border:1px solid silver;
  234.     background-color:#fff;
  235.     color:#404040;
  236.     font-size:10px;
  237.     font-family:Verdana, Arial, sans-serif;
  238.     text-transform:regular;
  239.     border-radius:5px;
  240.     -moz-border-radius:5px;
  241.     -webkit-border-radius:5px;
  242.     margin:10px 0;
  243.     padding:10px;
  244.     }
  245.      
  246.     input:hover[type=text],input:focus[type=text],textarea:hover,textarea:focus {
  247.     background-color:#E0E0E0;
  248.     border:1px solid #000;
  249.     }
  250.      
  251.     input[type=text],textarea {
  252.     width:300px;
  253.     }
  254.      
  255.     #submit {
  256.     border:none;
  257.     width:181px;
  258.     height:54px;
  259.     background:url(Images/submit.png);
  260.     }
  261.      
  262.     #submit:hover {
  263.     cursor:pointer;
  264.     }
  265.      
  266.     /* alert messages */
  267.     .success,.error {
  268.     color:#000;
  269.     display:none;
  270.     font-size:15px;
  271.     font-weight:700;
  272.     border-radius:4px;
  273.     -moz-border-radius:4px;
  274.     -webkit-border-radius:4px;
  275.     padding:5px 10px 5px 10px;
  276.     margin-bottom: 10px;
  277.     }
  278.      
  279.     .success {
  280.     background-color:#9F6;
  281.     border:1px solid #0F0;
  282.     width:300px;
  283.     }
  284.      
  285. .error {
  286. background-color:#F66;
  287. border:1px solid red;
  288. width:300px;
  289.  
  290. }