CÓDIGO
<?php
// Quita /
$nombre = stripslashes($_POST["nombre"]);
$email = stripslashes($_POST["email"]);
$telefono = stripslashes($_POST["telefono"]);
$Menu = stripslashes($_POST["lista"]);
$mensaje = stripslashes($_POST["mensaje"]);
$ciudad = stripslashes($_POST["ciudad"]);
if($promociones!='Si')$promociones='No';
$rec_email = "info@pagina.com";
$subject = "Mensaje desde mi web";
$msg_body = "<html><head></head><body>";
$msg_body = "<font face=\"Verdana\" size=\"2\">";
$msg_body .= "<i>Formulario de contacto</i><br>";
$msg_body .= "<hr width=\"100%\" size=\"1\" color=\"#333333\"><br>";
$msg_body .= "<b>Nombre:</b> $nombre<br>";
$msg_body .= "<b>Ciudad:</b> $ciudad<br>";
$msg_body .= "<b>Menu:</b> $lista<br>";
$msg_body .= "<b>E-Mail:</b> <a href=\"mailto:$email\">$email</a><br>";
$msg_body .= "<b>Telefono:</b> $telefono<br>";
$msg_body .= "<b>Desea recibir promociones:</b> $promociones<br>";
$msg_body .= "<b>Comentarios:</b> $mensaje<br>";
$msg_body .= "<hr width=\"100%\" size=\"1\" color=\"#333333\"><br>";
$msg_body .= "<br><br>";
$msg_body .= "<i>Información Adicional</i><br>";
$msg_body .= "<hr width=\"100%\" size=\"1\" color=\"#333333\"><br>";
if (getenv("HTTP_X_FORWARDED_FOR")) {
$ip = getenv("HTTP_X_FORWARDED_FOR");
} else {
$ip = getenv("REMOTE_ADDR");
}
$msg_body .= "<b>Dirección IP:</b> $ip<br>";
$HostName = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$msg_body .= "<b>Host:</b> $HostName<br>";
$msg_body .= "<b>Navegador:</b> $HTTP_USER_AGENT<br>";
$msg_body .= "<hr width=\"100%\" size=\"1\" color=\"#333333\"><br>";
$msg_body .= "</font></body></html>";
// Headers
$header_info = "MIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\n";
$header_info .= "From: $nombre<$email>";
// Envío
echo '<div class="unica">
<div class="titularGrande"></div>
<div id="formularioContacto" style="width:100%;">';
if($envio=@mail($rec_email, $subject, $msg_body, $header_info))
{
// Todo OK
echo'<div class="enviarOk"></div>';
}
else
{
// Error
echo'<div class="enviarError">Se ha producido un error y ha sido imposible enviar el formulario. Por favor, inténtelo más tarde. Si el problema persiste, comuniquenoslo enviando un email al <a href="mailto:webmmaster@sjbdixital.es"><span style="font-size:12px">webmaster</span></a>. Gracias.</div>';
}
echo '</div></div>';
?>
// Quita /
$nombre = stripslashes($_POST["nombre"]);
$email = stripslashes($_POST["email"]);
$telefono = stripslashes($_POST["telefono"]);
$Menu = stripslashes($_POST["lista"]);
$mensaje = stripslashes($_POST["mensaje"]);
$ciudad = stripslashes($_POST["ciudad"]);
if($promociones!='Si')$promociones='No';
$rec_email = "info@pagina.com";
$subject = "Mensaje desde mi web";
$msg_body = "<html><head></head><body>";
$msg_body = "<font face=\"Verdana\" size=\"2\">";
$msg_body .= "<i>Formulario de contacto</i><br>";
$msg_body .= "<hr width=\"100%\" size=\"1\" color=\"#333333\"><br>";
$msg_body .= "<b>Nombre:</b> $nombre<br>";
$msg_body .= "<b>Ciudad:</b> $ciudad<br>";
$msg_body .= "<b>Menu:</b> $lista<br>";
$msg_body .= "<b>E-Mail:</b> <a href=\"mailto:$email\">$email</a><br>";
$msg_body .= "<b>Telefono:</b> $telefono<br>";
$msg_body .= "<b>Desea recibir promociones:</b> $promociones<br>";
$msg_body .= "<b>Comentarios:</b> $mensaje<br>";
$msg_body .= "<hr width=\"100%\" size=\"1\" color=\"#333333\"><br>";
$msg_body .= "<br><br>";
$msg_body .= "<i>Información Adicional</i><br>";
$msg_body .= "<hr width=\"100%\" size=\"1\" color=\"#333333\"><br>";
if (getenv("HTTP_X_FORWARDED_FOR")) {
$ip = getenv("HTTP_X_FORWARDED_FOR");
} else {
$ip = getenv("REMOTE_ADDR");
}
$msg_body .= "<b>Dirección IP:</b> $ip<br>";
$HostName = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$msg_body .= "<b>Host:</b> $HostName<br>";
$msg_body .= "<b>Navegador:</b> $HTTP_USER_AGENT<br>";
$msg_body .= "<hr width=\"100%\" size=\"1\" color=\"#333333\"><br>";
$msg_body .= "</font></body></html>";
// Headers
$header_info = "MIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\n";
$header_info .= "From: $nombre<$email>";
// Envío
echo '<div class="unica">
<div class="titularGrande"></div>
<div id="formularioContacto" style="width:100%;">';
if($envio=@mail($rec_email, $subject, $msg_body, $header_info))
{
// Todo OK
echo'<div class="enviarOk"></div>';
}
else
{
// Error
echo'<div class="enviarError">Se ha producido un error y ha sido imposible enviar el formulario. Por favor, inténtelo más tarde. Si el problema persiste, comuniquenoslo enviando un email al <a href="mailto:webmmaster@sjbdixital.es"><span style="font-size:12px">webmaster</span></a>. Gracias.</div>';
}
echo '</div></div>';
?>
El problema radica en que no sé como relacionar el Menu del formulario para que me tome las variables el php, intente casi todo, no sé donde tengo la falla, si alguién supiera de estos temas y me pudiera dar una mano se lo agradeceria enromemente.
_saludos a Todos