php - How would you properly write this statement? -


new php programmer here. need syntax help.

like know im trying do, here, check if session variable set , if string value, "(" need isset messing syntax up. can't find im looking via google simple syntax question, had come here.

if (isset($_session['isvalid'] , $_session['isvalid']=="yes")) {   }else{   } 

typos:

if (isset($_session['isvalid']) , $_session['isvalid']=="yes") {                               ^---missing                      ^---only 1 ) here 

isset() function , checks single variable if "exists". you're trying isset() result of and operation, illegal syntax.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -