and that's what I was suggesting with using an if statement in that fashion, because if the variable isn't set, it outputs the default that the if statement tests for, thus testing for whether it's a set indirectly, but accurately.primehalo wrote: you will want to perform a specific action when the variable is not set
Testing for default matches and testing for isset are not one in the same, because the value of the variable could be the same your the default value. You're saying this condition is the same as checking for !isset($_GET['foo']):darksminky wrote:if the variable isn't set, it outputs the default that the if statement tests for, thus testing for whether it's a set indirectly, but accurately.
Code: Select all
if (request_var('foo', 'bar') == 'bar')
{
}