Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/07/2015, 19:14
ferja
 
Fecha de Ingreso: diciembre-2012
Ubicación: Sevilla
Mensajes: 2
Antigüedad: 11 años, 5 meses
Puntos: 0
envio de formulario con archivo adjunto

buenos noches, hace mucho que no entro por aquí, he tenido muchos contratiempos familiares.

Necesito hacer un formulario para recoger datos de los clientes y que ellos puedan adjuntar archivos y mandarlo por mail desde mi pagina web.

he creado un formulario en HTML y su archivo en php, pero hace mucho que no programo y no recuerdo muy bien como se hace, en definitiva no me funciona el envio de los datos.

necesito tener operativa la pagina antes del 5 de agosto y aun me queda mucho, por favor necesito vuestra ayuda.

Muchas gracias

PHP

<?php

$sendTo = "[email protected]";

$subject = "archivo1";

$correo = $_POST["correo"];

$Nombre = $_POST["Nombre"];

$Apellidos = $_POST["apellidos"];

$NIF = $_POST["nif"];

$Fecha_Nacimiento = $_POST["fecha_nacimiento"];

$Fecha_Carnet = $_POST["fecha_carnet"];

$Codigo_Postal = $_POST["codigo_postal"];

$Domicilio = $_POST["domicilio"];

$Concepto = $_POST["Concepto"];

$Texto = $_POST["Texto"];

$headers .= "";

$message = "\ncorreo: " . $correo . "\nNombre: " . $Nombre . "\nApellidos: " . $apellidos . "\nNIF: " . $nif . "\nFecha_Nacimiento: " . $fecha_nacimiento .
"\nFecha_Carnet: " . $fecha_carnet . "\nCodigo_Postal: " . $codigo_postal . "\nDomicilio: " . $domicilio . "\nConcepto: " . $Concepto . "\nTexto: " . $Texto;

mail($sendTo, $subject, $message, $headers);



header('Location: http://www.asesglobal.com/envio_formulario.html');

?>


y HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ice="http://ns.adobe.com/incontextediting">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Documento sin título</title>

<style type="text/css">

<!--

body {

background-color: #333;

}

body,td,th {

color: #0F0;

}

-->

</style>

<script src="../../includes/ice/ice.js" type="text/javascript"></script>

</head>



<body>

<table width="100%" border="1">

<tr>

<td width="120" height="23" bgcolor="#999999"><div align="center" ice:repeatinggroup="*"><strong><a href="inicio.html">INICIO</a><a href="inicio.html.html"></a><a href="inicio.html"></a><a href="inicio" ice:repeating="true"></a></strong></div></td>

<td width="129" bgcolor="#999999"><div align="center"><strong><a href="contacto.html">CONTACTO</a><a href="contacto.html.html"></a><a href="contacto.html"></a><a href="contacto"></a></strong></div></td>

<td width="134" bgcolor="#999999"><div align="center"><strong><a href="presupuesto.html">PRESUPUESTO</a><a href="presupuesto"></a></strong></div></td>

<td width="129" bgcolor="#999999"><div align="center"><strong><a href="campañas.html">CAMPAÑAS</a><a href="campañas"></a></strong></div></td>

<td width="130" bgcolor="#999999"><div align="center"><strong><a href="productos.html">PRODUCTOS</a><a href="productos"></a></strong></div></td>

<td width="154" bgcolor="#999999"><div align="center"><strong><a href="quienes_somos.html">QUIENES SOMOS</a><a href="quienes_somos"></a></strong></div></td>

<td width="125" bgcolor="#999999"><div align="center"><strong><a href="noticias.html">NOTICIAS</a><a href="noticias"></a></strong></div></td>

<td width="166" bgcolor="#999999"><div align="center"><strong><a href="documentacion.html">DOCUMENTACION</a><a href="documentacion"></a></strong></div></td>

<td width="102" bgcolor="#999999"><div align="center"><strong><a href="empleo.html">EMPLEO</a><a href="empleo"></a></strong></div></td>

</tr>

</table>

<h2 align=center>
Formulario de Autos
</h2>


<form action="formautos.php" method="post" enctype="multipart/form-data" name="form1" id="form1">

</form>


<form name='formulario' id='formulario' method='post' action='documentacion.php' target='_self' enctype="multipart/form-data">
</form>



<table width="80%" border="1" margin = "20%" align = center h3>



<tr>
<td><div align="right">Nombre</div></td>
<td><input name="nombre" type="text" id="nombre" maxlength="20"></td>


<td><div align="right">Apellidos</div></td>
<td><input name="apellidos" type="text" id="apellidos" maxlength="40"></td>

</tr>

<tr>
<td><div align="right">N.I.F.</div></td>
<td><input name="nif" type="text" id="nif" maxlength="10"></td>


<td><div align="right">Fecha Nacimiento</div></td>
<td><input name="Fecha_Nacimiento" type="text" id="fecha_nacimiento" maxlength="10"></td>

</tr>

<tr>
<td><div align="right">Fecha carnet</div></td>
<td><input name="f_carnet" type="text" id="f_carnet" maxlength="10"></td>


<td><div align="right">Codigo Postal</div></td>
<td><input name="postal" type="text" id="postal" maxlength="5"></td>

</tr>

<tr>
<td><div align="right">Domicilio</div></td>
<td><input name="domicilio" type="text" id="domicilio" maxlength="50"></td>


<td><div align="right">Correo Electronico</div></td>
<td><input name="correo" type="text" id="correo" maxlength="40"></td>

</tr>

<tr>
<td><div align="right">Telefono</div></td>
<td><input name="telefono" type="text" id="telefono" maxlength="20"></td>


<td><div align="right">Fecha Efecto</div></td>
<td><input name="fecha_efecto" type="text" id="fecha_efecto" maxlength="10"></td>

</tr>


<tr>
<td><div align="right">Marca</div></td>
<td><input name="marca" type="text" id="marca" maxlength="20"></td>


<td><div align="right">Modelo</div></td>
<td><input name="modelo" type="text" id="modelo" maxlength="40"></td>

</tr>


<tr>
<td><div align="right">Matricula</div></td>
<td><input name="matricula" type="text" id="matricula" maxlength="15"></td>




<td><div align="right">Coberturas</td>



<label for="Coberturas">

</label>

<td> <select name="Coberturas" id="Coberturas">

<option>Basico</option>

<option>Basico + Lunas</option>

<option>Basico + Lunas + Robo + Incendio</option>

<option>Todo Riesgo sin franquicia</option>

<option>Todo Riesgo con franquicia de 200</option>

<option>Todo Riesgo con franquicia 600</option>
</Td>

</tr>

<tr>
<td><div align="right">Aseguradora</div></td>
<td><input name="aseguradora" type="text" id="aseguradora" maxlength="30"></td>


<td><div align="right">Nº Poliza</div></td>
<td><input name="n_poliza" type="text" id="n_poliza" maxlength="20"></td>

</tr>


<tr>

<td><div align="right">Forma de Pago</div></td>

<td>



<label for="Forma_de_Pago"></label>

<select name="Forma_de_Pago" id="Forma_de_Pago">

<option>Anual</option>

<option>Semestral</option>

<option>Trimestral</option>

<option>Mensual</option>

</select>

</td>

</tr>


<tr>
<td><div align="right">Mensaje</div></td>

<td><textarea name="mensaje" cols="70" rows="10" id="mensaje"></textarea></td>



<td><h4 align="left">Adjuntar Archivo:</td>

<td> <input type='file' name='archivo1' id='archivo1'>

<input type='submit' value='Enviar'></td>

</h4>

</table>

</body>

</html>