When I write an if statement, I check the variable as follows:
if(isset($_GET['username']){
echo "set";
} else {
echo "unset";
}
How can I get an if statement to check if two variables are set:
if(isset($_GET['username'] & $_GET['firstname'])){
echo "set";
} else {
echo "unset";
}
So basically, how can I check two things in an if statement right away?
Sam
source
share