I can not declare variable inside id

0
@$c_id = $_POST['numero'];
@$data_aa = $_POST['data_aa']; // Data esta vazio

if($data_aa == ''){
$var = "oi";
echo "$var";
}

If I put the variable $var out of if() , it works normally.

    
asked by anonymous 16.09.2018 / 04:06

1 answer

0

I was able to do != empty )

if ($data_aa != null) {
    // funcionou!!!
}
    
16.09.2018 / 06:13