PHP - No me funcional el envio de datos y archivo adjunto

 
Vista:
sin imagen de perfil

No me funcional el envio de datos y archivo adjunto

Publicado por Carmen (2 intervenciones) el 26/07/2015 03:36:11
buenas 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, seguro que me podeis ayudar, muchas gracias y besitosss.

Muchas gracias

PHP

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
 
$sendTo = "ferja1872@gmail.com";
 
$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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<!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>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil

No me funcional el envio de datos y archivo adjunto

Publicado por Carmen (2 intervenciones) el 26/07/2015 10:40:31
Muchas gracias por su intención, pero no logro descifrar el ejemplo que me envías, además creo que no es lo que quiero, yo lo que necesito es que entres en mi pagina web, rellenes un formulario, adjunte un archivo y que tenga un botón de enviar por mail a mi correo electrónico, te agradecería muchísimo si modificaras lo necesario en mis archivos para que funcione, no se si me estoy extralimitando, pero como comente hace mas de 5 años que no hago nada de php y estoy totalmente perdido.
gracias
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar