PHP if statement - either but not both -


what's correct way rephrase statement passes if either variable set, not if both set?

if (isset($_get['txnid']) || isset($_get['complete'])){ 

yes, called xor, true if either 1 of them true, not both.

if (isset($_get['txnid']) xor isset($_get['complete'])){ 

source: php: logical operators


Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -