The problem:

if i submit the html form and a textbox is left blank  

then i don't want it to proceed to the echo segment,  

but the problem is it does proceed.

```
<?php
        if(!isset($_POST['submit']) && empty($_POST['moon']) && empty($_POST['planet']))
        { 
?>

        <form name="form2" method="post" action="<?php echo($_SERVER["PHP_SELF"]);?>">
            <div>
                Write a planet name: <input name="planet" type="text"><br>
                Its moon: <input name="moon" type="text">
            </div>
            <div>
                <input type="submit" name="submit" value="submit">
            </div>
        </form>

 <?php
       }else{

            echo("Planet: ".$_POST['planet']. "<br>");
            echo("Moon: ". $_POST['moon'] . "<br>");
            echo "Successful.";

            }
?>

```

As you know `isset()` determines if a variable is `set` and `not null` but doesn't check if it's empty. 

While logic seems my if statement, I modified it from:  

`if(!isset($_POST['submit']) && empty($_POST['moon']) && empty($_POST['planet']))`

To:

* `if(!isset($_POST['submit']) && ($_POST['planet']=='') && ($_POST['moon']==''))`
* `if(!isset($_POST['submit']))`
* `if(!isset($_POST['planet']) && !isset($_POST['moon']))`
* `if(empty($_POST['moon']) && empty($_POST['planet']))`

and none of them worked.

So am I doing something wrong with my if statement? how can I not let it proceed to the Else segment while a textbox is empty? without more if and no `nested` statements please.