Skip to content Skip to sidebar Skip to footer

How Add Various Hidden Divs (content) For Each Button With Slide Toggle Function

I've looked everywhere but couldn't find nothing similar. > I need this Slide toggle function to work for various hidden divs > (that contain images and text) that belong to

Solution 1:

If you want all fields to be mandatory, it should throw an error if either of $name or $email is empty; so you use OR. Also, if anti-spam is not 4, just throw an error, you don't have to check for $_POST['submit'] as you have already checked it.

  if ($_POST['submit']) {
        if ($name != '' OR $email != '') {
                if ($human == '4') {                 
                        if (mail ($to, $subject, $body, $from)) { 
                                echo '<p>Your message has been sent!</p>';
                        } else { 
                                echo '<p>Something went wrong, go back and try again!</p>'; 
                        }
                } else {
                        echo '<p>You answered the anti-spam question incorrectly!</p>';
                }
        } else {
            echo '<p>You need to fill in all required fields!!</p>';
        }
}

Post a Comment for "How Add Various Hidden Divs (content) For Each Button With Slide Toggle Function"