-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontactar.php
More file actions
executable file
·37 lines (28 loc) · 1.06 KB
/
contactar.php
File metadata and controls
executable file
·37 lines (28 loc) · 1.06 KB
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
<?php
define("ASUNTO", "Contacto desde la web de FLISoL");
define("PARA", "contacto@flisolaragon.com.mx");
if (!empty($_POST["correo"]))
$correo = strip_tags($_POST["correo"]);
else
exit("No llego el correo");
if (!empty($_POST["nombre"]))
$nombre = strip_tags($_POST["nombre"]);
else
exit("No llego el nombre");
if (!empty($_POST["institucion"]))
$institucion = strip_tags($_POST["institucion"]);
else
exit("No llego la institución");
if (!empty($_POST["mensaje"]))
$mensaje = strip_tags($_POST["mensaje"]);
else
exit("No llego el mensaje");
$encabezados = "MIME-Version: 1.0\r\n";
$encabezados .= "Content-type: text/html; charset=utf-8\r\n";
$encabezados .= "From: " . $nombre . " <" . $correo . ">\r\n";
$encabezados .= "Reply-To: " . $nombre . " <" . $correo . ">\r\n";
$encabezados .= "X-Mailer: PHP/" . phpversion();
$texto = "<p>" . $nombre . " de la institución: " . $institucion . " escrbió lo siguiente:</p>";
$texto .= "<p>" . $mensaje . "</p>";
mail(PARA, ASUNTO, $texto, $encabezados);
?>