我的代码:
<?php
if( isset($_POST["submit"]) ) {
// Contact subject
$name =$_POST["name"];
// Details
$message=$_POST["message"];
// Mail of sender
$mail_from=$_POST["email"];
// From
$header="from: $name <$mail_from>";
// Enter your email address
$to ='info.lightuptrading@gmail.com';
$send_contact=mail($to,$name,$message,$header);
}
// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
echo "We've recived your contact information";
}
else {
echo "ERROR";
}
?>
我已经定义了变量send_contact。为什么会说未定义,如果未定义?
有人知道解决方案吗?