I want to place an if statement into a variable in order to reduce the lines of code... for example I want to do this:
$empty = if(empty($_POST['username']) && empty($_POST['password']))
if($empty){ // echo message;
}
elseif(!$empty){ ///echo message;
}
Can something like the above be produced? Or am I making things too complex?
Just omit the if:
$empty = empty($_POST['username']) && empty($_POST['password']);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With