Q:

PHP if(isset) not working properly with 2 radio groups and 1 textname

Again the issue I am having is that instead of throwing the 'error' message when the text field or either of the two radio groups is NOT selected, it throws them ONLY when all 3 fields have been filled in. Here is the entire html & PHP page:
<body>
<form id="form1" name="form1" method="post" action="hw1.php">
<h1>
<label for="name2"></label>
Music Survey
</h1>
<p>Please Enter Your First Name
<label for="firstname"></label>
<input name="firstname" type="text" id="firstname" 
size="18"maxlength="18"  />
</p>
<h3>Please Enter Your Age Group</h3>
<p>
<label>
<input type="radio" name="agegroup" value="Youth" id="agegroup_0" />
Youth</label>(12 - 21)<br /><label>
<input type="radio" name="agegroup" value="Adult" id="agegroup_1" />
Adult</label>(22 - 50)<br /> <label>
<input type="radio" name="agegroup" value="Elderly" id="agegroup_2"/>
Elderly</label>(51 - Dead)
</p>
<h3>Please Enter Your Favorite Style Of Music</h3>
<p>
<label>
<input type="radio" name="music" value="Pop"  id="musicpreference_0" />
Pop</label>
<br />
<label>
<input type="radio" name="music" value="Country"    
id="musicpreference_1" />
Country</label>
<br />
<label>
<input type="radio" name="music" value="Rock" id="musicpreference_2" />
Rock</label>
</h3>
</h3>
<p>
<input type="submit" name="button" id="button" value="Submit Your Anwser" />
</p>
<p><br />
<input type="reset" name="button2" id="button2" value="Reset My Anwsers" 
/>
<br />
</p>
</form>
</body>

And here is the PHP portion:
<body>

<?php

if(isset($_POST['agegroup'])
    || isset($_POST['music']) 
    || !empty($_POST['firstname']))

    {
    echo "<h1>Please return to the form and fill out completely</h1>";
    }
    else
    {

 ?>
<h1>Thank For Taking the Survey <?php echo $_POST['firstname'] ?> </h1>

<?php

    if ($_POST['agegroup'] == 'Youth' && $_POST['music'] == 'Pop')
    {
        echo 'Pop Music Is Appropriate For Young People';
    }
    elseif ($_POST['agegroup'] == 'Youth' && $_POST['music'] == 'Rock')
    {
        echo 'Adults Listen To Rock Music, Not Young People';
    }
    elseif ($_POST['agegroup'] == 'Youth' && $_POST['music'] == 'Country')
    {
        echo "Country Music Is For Your Grandparents";
    }

    if ($_POST['agegroup'] == 'Adult' && $_POST['music'] == 'Pop')
    {
        echo 'Adults Don\'t Listen To Pop Music, Their Kids Do ';
    }
    elseif ($_POST['agegroup'] == 'Adult' && $_POST['music'] == 'Rock')
    {
        echo 'Rock Music Is Just Right For Adults';
    }
    elseif ($_POST['agegroup'] == 'Adult' && $_POST['music'] == 'Country')
    {
        echo 'Country Music Is What The Elderly Listen To!';
    }

    if ($_POST['agegroup'] == 'Elderly' && $_POST['music'] == 'Pop')
    {
        echo 'Pop Music Is For Young Kids';
    }
    elseif ($_POST['agegroup'] == 'Elderly' && $_POST['music'] == 'Rock')
    {
        echo 'Adults Listen To Rock Music';
    }
    elseif ($_POST['agegroup'] == 'Elderly' && $_POST['music'] == 'Country')
    {
        echo 'Country Music Is Perfect For The Elderly';
    }
}
?>

</body>

I have an if statement that I need to return as both radio groups have been selected and the text box has been filled in or else, deliver and error message and for some reason it's not working, could someone help me figure out what I am missing? The 'agegroup' and 'music' are the radio groups and the 'firstname' is the text box.
<?php

if(isset($_POST['agegroup']) && isset($_POST['music'])
&&!($_POST['firstname'] == NULL))
{
?>
<h1>Thank For Taking the Survey <?php echo $_POST['firstname'] ?> </h1>
else
{
echo "<h1>Please return to the form and fill out completely</h1>";
}

A:

If you have a named submit button, you can use the following:
if(isset($_POST['submit']) 
   && isset($_POST['agegroup']) 
   && isset($_POST['music']) 
   && !empty($_POST['firstname']))

which will also check if the submit button was clicked.
Or you can use:
if(isset($_POST['agegroup']) 
   && isset($_POST['music']) 
   && !empty($_POST['firstname']))

Both of which worked while testing the following, and as an example which you can modify to include the variables you are using for the rest of your form:
<form method="post" action="">

Age group: <input type="radio" name="agegroup" value="agegroup1">
<input type="radio" name="agegroup" value="agegroup2">

<br>
Music: <input type="radio" name="music" value="music1">
<input type="radio" name="music" value="music2">
<br>
First name <input name="firstname" type="text">
<br>
<input name="submit" type="submit" value="Submit">

</form>

<?php

// if(isset($_POST['agegroup']) && isset($_POST['music']) && !empty($_POST['firstname']))

$name = $_POST['firstname'];

if(isset($_POST['submit']) 
   && isset($_POST['agegroup']) 
   && isset($_POST['music']) 
   && !empty($_POST['firstname']))

    {
    echo "<h1>Thank For Taking the Survey " .$name. "</h1>";
    }

else
    {
    echo "<h1>Please return to the form and fill out completely</h1>";
    }

Edit: (this code block)
<?php

if(isset($_POST['agegroup'])
    || isset($_POST['music']) 
    || !empty($_POST['firstname']))

    {
    echo "<h1>Please return to the form and fill out completely</h1>";
    }

What this is saying is if they're set and not empty, then fill out the form.
This needs to be the reverse: (if NOT set OR empty...)
<?php

if(!isset($_POST['agegroup'])
    || !isset($_POST['music']) 
    || empty($_POST['firstname']))

    {
    echo "<h1>Please return to the form and fill out completely</h1>";
    }

