Ver Mensaje Individual
  #4 (permalink)  
Antiguo 24/11/2004, 00:42
LordCat
 
Fecha de Ingreso: octubre-2003
Ubicación: Buenos Aires, Capital Federal
Mensajes: 43
Antigüedad: 20 años, 5 meses
Puntos: 0
y aca el segundo
//-----------------------------------------------------------
<?
//----CONFIGURACIONES----------------------------------------
$emaildest = '[email protected]'; //DESTINATARIO
$asunto = 'Contacto - '.date("l dS of F Y h:i:s A");//ASUNTO DEL MAIL
//-----------------------------------------------------------
//----VERIFICACION-DE-SERVER---------------------------------
$host=$_SERVER['HTTP_HOST'];//HOST: spaw.exbin.com
$ref='REFERENCIA:'.$_SERVER['HTTP_REFERER']; //REF : REFERENCIA:http://spaw.exbin.com/conf_contenido/contacto/index.php
//-----------------------------------------------------------
if(!strpos($ref,$host)){ //BUSCO 'spaw.exbin.com' en 'REFERENCIA:http://spaw.exbin.com/conf_con....'
?>
<SCRIPT LANGUAGE="JavaScript">
location.href='about:blank';
</SCRIPT>
<?
}else{
//----VARIABLES del formulario-------------------------------
$nombreyapellido = $HTTP_POST_VARS['nombreyapellido'];
$telefono = $HTTP_POST_VARS['telefono'];
$email = strtolower($HTTP_POST_VARS['email']);
$comentarios = $HTTP_POST_VARS['comentarios'];
//-----------------------------------------------------------
//----HEADERS------------------------------------------------
$sheader="From: ".$nombreyapellido." <".$email.">\r\n";
$sheader=$sheader."X-Mailer:PHP/".phpversion()."\n";
$sheader=$sheader."Mime-Version: 1.0\n";
$sheader=$sheader."Content-Type: text/html";
//-----------------------------------------------------------
//----MENSAJE------------------------------------------------
$mensaje = "<html><b><u>Datos de la consulta</u></b><br>";
$mensaje .= "Nombre y Apellido: " .$nombreyapellido. "<br>";
$mensaje .= "Teléfono: " .$telefono. "<br>";
$mensaje .= "E-Mail: <a href='mailto:".$email."'>".$email."</a><br>";
$mensaje .= "Comentarios: " .$comentarios. "<br><HTML>";
//-----------------------------------------------------------
//----ENVIO-DE-MAIL------------------------------------------
mail($emaildest,$asunto,$mensaje,$sheader) // ACA HAY UN QUILOMBO DE AQUELLOS, EN TEORIA SI SACAS EL ! TIENE QUE FUNCAR BEIN PERO NO LO ESTA HACIENDO => QUEDA ASI
//-----------------------------------------------------------
//------CARGA EN LA BASE DE DATOS----------------------------
/*
$strcons = "INSERT INTO tabla(
id,
nombreyapellido,
telefono,
email,
comentarios
)
VALUES (
' ',
'$nombreyapellido',
'$telefono',
'$email',
'$comentarios'
)";
$result = query($strcons);
*/
//------MUESTRO PANTALLA DE OK------------------------
?>
<SCRIPT LANGUAGE="JavaScript">
location.href='../../paginas/contacto_enviado.htm';
</SCRIPT>
<?
}//fin del else del primer if (VERIFICA HOST)
?>