解析错误:语法错误,意外的':',期望为')'

时间:2019-12-30 16:38:51

标签: php html

尝试在localhost上打开联系表时遇到问题 显示此:

  

解析错误:语法错误,意外的':',期望的是')'

PHP代码

<?php
if(isset($_POST['submit'])){
require 'phpmailer/PHPMailerAutoload.php';

function sendemail($to, $from, $fromName, $body){
$mail = new PHPMailer();
$mail->setFrom($from, $fromName);
$mail->addAdress($to);
$mail->Subject = 'Concat Form - Email';
$mail->body = $body;
$mail->isHTML(isHtml);
}
return $mail->send();


} 
$name = $_POST['username'];
$email = $_POST['email'];
$body = $_POST['body'];

echo "<pre>";
print_r($_FILES);
if(sendemail( to:'mitrevski.co@gmail.com', $email, $name, $body))
$msg = 'Email sent';
sendemail( to:'mitrevski.co@gmail.com', from:'website')
else = $msg = 'Email Failed ! '
?>

有人可以帮助我吗?

0 个答案:

没有答案