Hi,
I have the form to mail script; it works fine, except after submitting it shows part of the code in the Explorer windows:
aders[$header]."\r\n"; if(($success=$this->SendData($header_data."\r\n"))) { $this->PrepareData($body,&$body_data); $success=$this->SendData($body_data); } if($success) $success=$this->EndSendingData(); } } $error=$this->error; $disconnect_success=$this->Disconnect($success); if($success) $success=$disconnect_success; else $this->error=$error; } return($success); } }; } ?>OK.
The script is here:
<?php
$i=0;
if (!is_array($HTTP_POST_VARS))
return;
reset($HTTP_POST_VARS);
while(list($key, $val) = each($HTTP_POST_VARS)) {
$GLOBALS[$key] = $val;
$val=stripslashes($val);
//echo "<b>$key</b> = $val<br>";
$message = $message."$key = $val\n";
}
$message= "$message";
require("class.smtp.php");
$smtp=new smtp();
$smtp->host_name = "localhost";
$smtp->localhost = "host.sk";
$username = "doma52";
$password = "hju677hy";
$from = "md@stonline.sk";
$to = "jzn1@yahoo.com";
$subject = "Sprava z web-u";
$text = "$message";
$smtp->SendMessage( $from, array( $to ), array( "From: $from", "To: $to", "Subject: $subject" ), $text );
echo "<b>OK.</b>";
?>
Any idea how to fix it, please?
I have the form to mail script; it works fine, except after submitting it shows part of the code in the Explorer windows:
aders[$header]."\r\n"; if(($success=$this->SendData($header_data."\r\n"))) { $this->PrepareData($body,&$body_data); $success=$this->SendData($body_data); } if($success) $success=$this->EndSendingData(); } } $error=$this->error; $disconnect_success=$this->Disconnect($success); if($success) $success=$disconnect_success; else $this->error=$error; } return($success); } }; } ?>OK.
The script is here:
<?php
$i=0;
if (!is_array($HTTP_POST_VARS))
return;
reset($HTTP_POST_VARS);
while(list($key, $val) = each($HTTP_POST_VARS)) {
$GLOBALS[$key] = $val;
$val=stripslashes($val);
//echo "<b>$key</b> = $val<br>";
$message = $message."$key = $val\n";
}
$message= "$message";
require("class.smtp.php");
$smtp=new smtp();
$smtp->host_name = "localhost";
$smtp->localhost = "host.sk";
$username = "doma52";
$password = "hju677hy";
$from = "md@stonline.sk";
$to = "jzn1@yahoo.com";
$subject = "Sprava z web-u";
$text = "$message";
$smtp->SendMessage( $from, array( $to ), array( "From: $from", "To: $to", "Subject: $subject" ), $text );
echo "<b>OK.</b>";
?>
Any idea how to fix it, please?