Ayuda: D, necesito hacer un un-to, to en enual en univiv un un imagen a la persona que lleno el formulario, ten go el siguiente códi go, utilizo phpmailer
Помощь: D, мне нужно сделать ответ, в котором я отправил файл или изображение человеку, который заполнил форму, у меня есть следующий код, я использую phpmailer
PHPMAILER
<?php
$nombre = $_POST['nombre'];
$email = $_POST['email'];
$telefono = $_POST['telefono'];
//$ubicacion = $_POST['ubicacion'];
$mensaje = $_POST['mensaje'];
$nom_pag2= 'Pagina Ceca';
$para = '....@....' . ', ';
//$para = '...@...' . ', ';
$header = "From: $nombre <$email>\n";
$header .= 'MIME-Version: 1.0' . "\r\n";
$header .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$message = "<html><body>";
$message .= "<table align='center' width='100%' border='0' cellpadding='0' cellspacing='0' style='max-width:650px; background-color:#fff; font-family:Verdana, Geneva, sans-serif;'>";
$message .= "<tbody>
<tr style='border-radius:10px'>
<th style='color:white;background:linear-gradient(50deg,rgb(15,90,224) 0%,rgb(15,90,224) 0%,rgb(116,0,186) 100%,rgb(116,0,186) 100%);text-align:center;padding:10px'>Nombres</th>
<td style='padding:10px'>
<p style='font-size:15px;font-family:Century Gothic;margin:2px'>".$nombre."</p>
</td>
</tr>
<tr style='border-radius:10px'>
<th style='color:white;background:linear-gradient(50deg,rgb(15,90,224) 0%,rgb(15,90,224) 0%,rgb(116,0,186) 100%,rgb(116,0,186) 100%);text-align:center;padding:10px'>Email</th>
<td style='padding:10px'>
<p style='font-size:15px;font-family:Century Gothic;margin:2px'>".$email."</p>
</td>
</tr>
<tr style='border-radius:10px'>
<th style='color:white;background:linear-gradient(50deg,rgb(15,90,224) 0%,rgb(15,90,224) 0%,rgb(116,0,186) 100%,rgb(116,0,186) 100%);text-align:center;padding:10px'>Teléfono</th>
<td style='padding:10px'>
<p style='font-size:15px;font-family:Century Gothic;margin:2px'>".$telefono."</p>
</td>
</tr>
<tr style='border-radius:10px'>
<th style='color:white;background:linear-gradient(50deg,rgb(15,90,224) 0%,rgb(15,90,224) 0%,rgb(116,0,186) 100%,rgb(116,0,186) 100%);text-align:center;padding:10px'>Mensaje</th>
<td style='padding:10px'>
<p style='font-size:15px;font-family:Century Gothic;margin:2px'>".$mensaje."</p>
</td>
</tr>
</tbody>";
$message .= "</table>";
$message .= "</body></html>";
//$msjCorreo = "Nombre: $nombre\n Celular: $celular\n E-Mail: $email\n Ciudad:$ciudad \n Mensaje:\n $mensaje ";
if(mail($para, $nom_pag2, $message, $header))
{
echo "<script language='javascript'>
window.location.href = '../gracias.html';
</script>";
} else {
echo 'Falló el envio';
}
?>
html acde podemos encontrar el códi go que utilizo en html5 (здесь мы можем найти код, который я использую в html5)
<form class="contact-form" class="contact-form" method="POST" action="mail.php" autocomplete="off">
<div class="form-field">
<img src="img/icons/profile.png" alt="">
<input type="text" placeholder="Nombres & Apellidos o Empresa" name="nombre">
</div>
<div class="form-field">
<img src="img/icons/headphone.png" width="5%" alt="">
<input type="text" placeholder="Teléfono" name="telefono">
</div>
<div class="form-field">
<img src="img/icons/envelope.png" alt="">
<input type="text" placeholder="Email " name="email">
</div>
<div class="form-field">
<img src="img/icons/chat.png" alt="">
<textarea placeholder="Mensaje" name="mensaje"></textarea>
</div>
<button type="submit" class="site-btn">Enviar</button>
</form>