I'm trying to use and if statement in php and for some reason the 'and' logic operator (&&) isn't working. Here's the code:
if (isset($_POST['q1'])&&isset($_POST['q2'])&&isset($_POST['q3'])&&isset($_POST['q4'])&&isset($_POST['q5'])){
echo "<h1>APRIL FOOLS! YOU JUST ANSWERED ALL THOSE QUESTIONS FOR NOTHING!!!!";
} else{
header("Location: http://www.jamesthistlewood.co.uk/chatter/free_premium.php?error=1");
}
I have tried a couple of workarounds such as setting one of the values to False, but the statement is still not working. I just can't see what's wrong with it. Thanks in advance.