Hi/
Bit new to PHP. I am adding a PHP send file to my FTP but I don't seem to be able to get it to work. Can anyone help?
In dreamweaver I am indicating method of POST with action of sendmail.php and application/x-www-form-urlencoded. I getting line 91 problems.
$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;
$name = $_POST ;
$email = $_POST ;
$comments = $_POST ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST)) {
header( "Location: $formurl" );
exit ;
}
//added line below to conform with Streamline rules
if (!ini_set("sendmail_from",$_post)){
header( "Location: $errorurl" );
exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
}
if ( ereg( "[\r\n]", $name ) || ereg( "[\r\n]", $email ) ) {
header( "Location: $errorurl" );
exit ;
}
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}
$messageproper =
"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------------------------------------------\n" .
"Name of sender: $name\n" .
"Email of sender: $email\n" .
"------------------------- COMMENTS -------------------------\n\n" .
$comments .
"\n\n------------------------------------------------------------\n" ;
mail($mailto, $subject, $messageproper,
"From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" );
header( "Location: $thankyouurl" );
exit ;
?>