mardi 23 février 2016

PHP Sessions, Roles and IF statements

I have a question about which one is better? any feedback?

<?php

if (htmlentities($_SESSION['user_role'], ENT_QUOTES) != 'R') {

}

?>

OR

<?php

if ($_SESSION['user_role'] != 'R') {

}

?>

Aucun commentaire:

Enregistrer un commentaire