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

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -