Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/02/2005, 18:58
Avatar de satake
satake
 
Fecha de Ingreso: julio-2004
Mensajes: 140
Antigüedad: 19 años, 9 meses
Puntos: 0
adjuntar archivos

Hola, tengo el siguiente script php para enviar un formulario por mail, quisiera agregarle para adjuntar archivos, necesito si alguien me puede decir que agregarle al script para que tambien se puedan adjuntar archivos y enviarse por mail, desde ya muchas gracias, chau

Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<html> 
<head> 
    <title>Mándanos tus comentarios</title> 
</head> 

<body bgcolor="#cccc66" text="#003300" link="#006060" vlink="#006060"> 
<? 
if (!$HTTP_POST_VARS){ 
?> 
<form action="envia_form_php.php" method=post> 
Nombre: <input type=text name="nombre" size=16> 
<br> 
Email: <input type=text name=email size=16> 
<br> 
Comentarios: <textarea name=coment cols=32 rows=6></textarea> 
<br> 
<input type=submit value="Enviar"> 
</form> 
<? 
}else{ 
    
//Estoy recibiendo el formulario, compongo el cuerpo 
    
$cuerpo "Formulario enviado\n"
    
$cuerpo .= "Nombre: " $HTTP_POST_VARS["nombre"] . "\n"
    
$cuerpo .= "Email: " $HTTP_POST_VARS["email"] . "\n"
    
$cuerpo .= "Comentarios: " $HTTP_POST_VARS["coment"] . "\n"

    
//mando el correo... 
    
mail("[email protected]","Formulario recibido",$cuerpo); 

    
//doy las gracias por el envío 
    
echo "Gracias por rellenar el formulario. Se ha enviado correctamente."

?> 
</body> 
</html>