<?php
if (!preg_match("{(?:login|logout|register)\.php$}", $_SERVER["PHP_SELF"]))
{    
    if (empty($_SESSION["id"]))
    {
        redirect("login.php");
    }
 }
?>
Couldn't understand how my 1st if conditions is checking pages other than login.php, logout.php, register.php .. What ?: is doing?
 
    