Ver Mensaje Individual
  #6 (permalink)  
Antiguo 11/05/2006, 23:18
raulo460
 
Fecha de Ingreso: diciembre-2003
Mensajes: 49
Antigüedad: 20 años, 3 meses
Puntos: 0
Hola B**

No me sale ningún error porque no tengo código php que le haga funcionar, eso es precisamente lo que quiero:

Mira te pongo el código del formulario por un lado y el php por otro:

Código HTML:
<form action="/contactform/contactscript.php" method="post" enctype="multipart/form-data" name="form">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="left" valign="top" class="Estilo3"><p><span class="Estilo16"> Solicitud de servicio</span></p></td>
          </tr>
        </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td valign="top"><span class="Estilo4"><strong>Nombre*</strong><br />
                  <input name="name" type="text" class="Estilo7" id="name" size="20" maxlength="100" />
            </span></td>
            <td valign="top"><span class="Estilo4"><strong>Apellidos*</strong><br />
                  <input name="apellidos" type="text" class="Estilo7" id="apellidos" size="20" maxlength="100" />
            </span></td>
            <td><span class="Estilo4"><strong>Tel&eacute;fono* </strong><br />
                  <input name="tlf" type="text" class="Estilo7" id="tlf" size="20" maxlength="100" />
            </span></td>
          </tr>
          <tr>
            <td colspan="2" valign="top"><span class="Estilo4"><strong>Direcci&oacute;n*</strong><br />
                  <input name="direccion" type="text" class="Estilo7" id="direccion" size="48" maxlength="100" />
            </span></td>
            <td><span class="Estilo4"><strong>Su Email </strong><br />
                  <input name="email" type="text" class="Estilo7" id="email" size="20" maxlength="100" />
            </span></td>
          </tr>
        </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="307" align="left" valign="bottom" class="Estilo3"><strong class="Estilo4">&iquest;Qu&eacute; servicio desea contratar?</strong><br />
                <textarea name="msg" cols="55" rows="4" class="Estilo7" id="msg"></textarea></td>
            <td width="89" align="left" valign="bottom" class="Estilo3"><div align="center">
                <input name="Submit" type="submit" class="Estilo7" id="Submit" value="    Enviar    " />
            </div></td>
          </tr>
        </table>
        <p>Curriculum
          <input type="file" name="file" />
        </p>
      </form> 
Código php dentro del archivo contactscript.php
Código PHP:
<?php 
        
    
// VALUES FROM THE FORM
    
$name        $_POST['name'];
    
$email        $_POST['email'];
    
$message    $_POST['msg'];
    
$apellidos    $_POST['apellidos'];
    
$tlf        $_POST['tlf'];
    
$direccion    $_POST['direccion'];

    
// ERROR & SECURITY CHECKS
    
    
if ( ( !$name ) ||
         ( 
strlen($name) > 100 ) ||
         ( 
preg_match("/[:=@\<\>]/"$name) ) 
       )
    { 
        print 
"Por favor, rellene el campo Nombre"
        exit; 
    
    } 
    
    if ( ( !
$apellidos ) ||
         ( 
strlen($apellidos) > 100 ) ||
         ( 
preg_match("/[:=@\<\>]/"$apellidos) ) 
       )
    { 
        print 
"Por favor, rellene el campo Apellidos"
        exit; 
    
    } 
    
    if ( ( !
$tlf ) ||
         ( 
strlen($tlf) > 100 ) ||
         ( 
preg_match("/[:=@\<\>]/"$tlf) ) 
       )
    { 
        print 
"Por favor, rellene el campo Teléfono"
        exit; 
    
    } 
    
    if ( ( !
$direccion ) ||
         ( 
strlen($direccion) > 100 ) ||
         ( 
preg_match("/[:=@\<\>]/"$direccion) ) 
       )
    { 
        print 
"Por favor, rellene el campo Dirección"
        exit; 
    
    } 
    
    if ( 
preg_match("#cc:#i"$message$matches) )
    { 
        print 
"Error: Found Invalid Header Field"
        exit; 
    } 
    
    
    
// CREATE THE EMAIL
    
$headers "Content-Type: text/plain; charset=iso-8859-1\n";
    
$headers "From: $name <$email>\n";
    
$recipient "[email protected]";
    
$subject "Contacto o Solicitud de servicio - Cuidado del Hogar";
    
$message wordwrap($message1024);

    
// SEND THE EMAIL TO YOU
    //mail($recipient, $subject, stripslashes($msg), $headers);
    
mail($recipient$subject"\nNombre:".$name."\nApellidos:".$apellidos."\nTeléfono:".$tlf."\nDirección:".$direccion."\nE-mail:".$email."\nComentarios/Servicio que desea contratar:".stripslashes($msg), $headers); 

 
// the mail() function sends the message to you


    // REDIRECT TO THE THANKS PAGE
    
header("location: http://www.cuidadodelhogar.es/index.php?option=enviado");
    
?>
El campo de adjuntar archivo es el <input type="file" name="file" /> que está al final del código y ese es el que quiero que funcione.

A ver si me puedes ayudar amigo