Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/11/2006, 14:24
ManoloJ
 
Fecha de Ingreso: noviembre-2006
Mensajes: 4
Antigüedad: 18 años, 4 meses
Puntos: 0
Ayuda con superglobals, por favor

Bueno, hacia muchos años que no programaba (Lo ultimo VB 6.0) pero por compromiso de amistad me he tenido que meter a hacer un website.

Normalmente usaba FrontPage para hacer sencillos sites y he continuado con lo mismo. Mi servidor actual soporta las extensiones FP, pero no el envio de formularios con el webbot de FP y me han sugerido que utilice PHP.

Bien, mi problema es el siguiente: He hecho con FP un formulario, cuyos resultados quiero mandarmelos por e-mail. Para ello he utilizado "PhpMailer" (Una biblioteca ya configurada para envio de mails).

Todo funciona a la perfeccion, pero la variable $_REQUEST que pasa desde el formulario al php llega vacia.

Primero utilice $_POST, pero el resultado era el mismo.

He testeado "echo nl2br(print_r ($_REQUEST, true))" y el resultado en pantalla es simplemente "Array( )".

Brevemente mi codigo en Htm es:

Cita:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>SOLICITUD</title>
</head>

<body>


<? require ('class.phpmailer.php'); # <--- Carga la biblioteca de phpmailer ?>


<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{

if (theForm.Correo_Electronico.value == "")
{
alert("Please enter a value for the \"Correo_Electronico\" field.");
theForm.Correo_Electronico.focus();
return (false);
}
return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form action="../Otro.php" method="POST" ENCTYPE="text/plain" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">

<center>

<p align="center" style="margin: 1"><font color="#00FFFF" face="Arial Black" size="4">
<span style="background-color: #000080">&nbsp;&nbsp;&nbsp; SOLICITUD &nbsp;&nbsp;&nbsp;
</span></font></p>

<p style="margin: 1"><font size="1">&nbsp;</font></p>
<table border="0" width="586" height="63" id="AutoNumber1" cellspacing="1" bordercolor="#C0C0C0" style="border-collapse: collapse">
<tr>
<td width="567" height="17" colspan="2" align="center" bgcolor="#C0C0C0">
DATOS DE CONTACTO</td>
</tr>

.....Resto de variables

</form>

</body>

</html>


y el php completo es ahora

Cita:
<?
require ('class.phpmailer.php');

echo nl2br(print_r ($_REQUEST, true));

$mail = new PHPMailer();
$mail->IsSMTP();
$mail->From = "[email protected]";;
$mail->FromName = "Nombre usuario prueba";
$mail->Host = 'mail.djhsoluciones.com';
$mail->SMTPAuth = true;
$mail->Username = '[email protected]';
$mail->Password = '333321';
$mail->AddAddress("[email protected]", "Su nombre");
$mail->Subject = "Asunto";
$mail->Body = $_REQUEST;
if($mail->Send())
{
echo "email enviado";
exit;
}
echo "Hubo un error enviando el mensaje";
?>
¿Que esta ocurriendo para que todos los superglobals lleguen vacios?

Gracias anticipadas.

NOTA: El hosting utiliza PHP 5.0