I prefer to format my {} symbols differently to most coders but this should work for you.. (I've not tested it though) but first I'll show you what I don't like about your code:
PHP Code:
// If your user clicks enter/return in a text box your button won't be submitted
//Use a hidden form element instead
if (isset($_POST['submit'])) {
//isset returns a boolean - not a string that you can compare
//Also what is $Drophearaboutus1?
if (isset($_POST['hearaboutus']) == "Radio" && $Drophearaboutus1 == "")
{
$hearaboutus_error = 1;
$problems=1;
}
//Same as above but you're not even using if?
isset($_POST['hearaboutus']) == "Television" && $Drophearaboutus2== "")
{
$hearaboutus_error = 1;
$problems=1;
}
}
Let me show you how I would do it:
PHP Code:
//Check that form is being submitted by checking for hidden element
if (isset($_POST['submitter']))
{
//If hearboutus is set AND it compares to Radio
if ((isset($_POST['hearaboutus'])) and ($_POST['hearaboutus'] == "Radio"))
{
$hearaboutus_error = 1;
$problems=1;
}
//Same as above
if ((isset($_POST['hearaboutus'])) and ($_POST['hearaboutus'] == "Television"))
{
$hearaboutus_error = 1;
$problems=1;
}
}
Note that I dropped $Drophereaboutus as you've not explained where they come from, how they're set or what they're used for so I can't really see what I'm using it for or how to demonstrate it