I had a form that asked for mail and sent to a function that answered with information. Now I added a Hidden field in the form to send the path of the file via POST, but when I send it, it gives me an error:
Parse error: syntax error, unexpected 'Content' (T_STRING) in /home/idecap/public_html/php/mail.php on line 10
I searched but I do not give with the error, I share the code.
Función mail.php
<?php
$para = $_POST['EMAIL'];
$nombre = $_POST['id'];
$copia = "[email protected]";
$descarga = "www.idecap.org/administrar/upload/$nombre";
$asunto = "DESCUENTO ESPECIAL - APROVECHA AHORA MISMO";
$mensaje = "<html lang ='es'>"
. "<head><meta http-equiv="Content-Type" content="text/html; charset=gb18030">"
. "<title>Descarga el Temario con un descuento Especial</title>"
. ""
. "</head>"
. "<body>"
. "Gracias por capacitarte con IDECAP Educaci贸n Ejecutiva"
. " para acceder al temario con el descuento del curso, da clic aquí: </br>"
. "<a href='$descarga'> Acceder</a>"
."</body>"
. "</html>";
$cabeceras ='MIME-Version: 1.0' . "\r\n";
$cabeceras.='Content-type: text/html; charset=iso-8859-1' . "\r\n";
$cabeceras.= 'From: IDECAP Educacion Ejecutiva <[email protected]>' ."\r\n";
mail("$para,$copia", $asunto, $mensaje, $cabeceras);
?>;
And this is the part of the form:
<form id="mailchimp-subscription-form1" class="newsletter-form mt-40" method="POST" action="php/mail.php">
<label for="mce-EMAIL"></label>
<div class="input-group">
<input type="email" id="mce-EMAIL" data-height="45px" class="form-control input-lg" placeholder="Tu Email" name="EMAIL" value="">
<input type="hidden" id="id" name="id" value="<?php $row['descarga_pdf']; ?>">
<span class="input-group-btn">
<button type="submit" class="btn btn-colored btn-dark btn-lg m-0" data-height="45px">Recibir</button>
</span>
</div>
</form>