Forum Moderators: coopster
Could anyone give me a pointer with the following code please:-
$login_check = ((!isset($_SESSION['admin']) && isset($_COOKIE['Login'])) ? "Cookie yes but no session" :
(isset($_SESSION['admin']) && !isset($_COOKIE['Login'])) ? "session but no cookie" :
(isset($_SESSION['admin']) && isset($_COOKIE['Login'])) ? "Session and cookie": "Nothing is set");
The strings in there are just for debugging..
I'm not sure whether this is the best way to go about this, but depending on how & if Cookie or Session is set depends on what sql statement is issued. This is instead of having multiple if clauses.
Thanks for any help.
MRb