Cita:
Iniciado por Silenn
Explicame un poco, supongo que la url que quieres mandar dirige a un artículo en particular, desde dónde estás ejecutando el formulario?
Te explico:
Tengo varias postales realizada en flash ej
http://portal.gdfemia.com.ar/web/est...lamistad1.html
Al enviar una postal ejecuta una llamada a enviodepostales.php
esto ejecuta
Código Javascript
:
Ver originalon (release) {
// Here we will validate the fields (make sure something was actually typed in)
if (!_root.nombre.length) {
_root.Status = "Por favor, ingrese su nombre";
} else {
if (!_root.email.length || _root.Email.indexOf("@") == -1 || _root.Email.indexOf(".") == -1) {
_root.Status = "Por favor, ingrese tu email";
} else {
if (!_root.receptor.length || _root.Receptor.indexOf("@") == -1 || _root.Receptor.indexOf(".") == -1) {
_root.Status = "Por favor, ingrese el email del destinatario";
} else {
if (!_root.mensaje.length) {
_root.Status = "Por favor, escriba su mensaje";
} else {
// Make sure to add any additional input fields here as well
_root.Status = "La postal ha sido enviada";
nombre = _root.nombre;
email = _root.email;
receptor = _root.receptor;
consulta = _root.mensaje;
loadVariablesNum("enviodepostales.php",0,'POST');
_root.gotoAndPlay("submitted");
}
}
}
}
}
y el php se encarga de enviar el mensaje con la url de la postal
Código PHP:
Ver original<?php
if ( isset($_POST[ 'nombre' ]) and
!empty( $_POST[ 'nombre' ] ) ){ $host= $_SERVER["HTTP_HOST"];
$url= $_SERVER["REQUEST_URI"];
$para = $_POST['receptor'];
$asunto = "Postal enviada por tu amigo/a desde gdfemia.com.ar";
$nombre = $_POST['nombre'];
$mail = $_POST['email'];
$link = $_POST['link'];
$consulta = $_POST['consulta'];
$mensaje = "Este mensaje fue enviado por " . $nombre . " \r\n";
$mensaje .= " Te han enviado una postal, para verla entra a " . $link . " http:// " . $host . $url;
$mensaje .= " El email de su amigo es: " . $mail . " \r\n";
$mensaje .= " Mensaje: " . $consulta . " \r\n";
$mensaje .= " Enviado el " . date('d/m/Y', time()); ?>
<?php
}
?>
y ahí en ver de enviar
http://portal.gdfemia.com.ar/web/est...lamistad1.html me envía http://
portal.gdfemia.com.ar/web/estatica/enviodepostales.php
es decir
http://
portal.gdfemia.com.ar/web/estatica/ -> hasta aca me manda bien
http://
portal.gdfemia.com.ar/web/estatica/enviodepostales.php -> en vez de mandarme la terminación de la url que seria postalamistad1.html, me manda enviodepostales.php que es el código php que uso para enviar