I'm using isset to check if a variable is set and not null, then I process it (e.g. send it via email or to a Google Spreadsheet). Sometimes I receive empty results, like if the variable is null or empty, not even an empty space. Why is this happening? Am I missing something?
if(isset($_POST["name"]) && isset($_POST["phone"])){
$name = $_POST["name"];
$phone = $_POST["phone"];
$message="Nom: $name \nPhone: $phone \n";
require 'PHPMailer/PHPMailerAutoload.php';
$mail = new PHPMailer;
$mail->setFrom('from@mail.com', 'Name From');
$mail->addAddress('to@mail.com', 'Name To');
$mail->Subject = 'Subject';
$mail->Body = $message;
}