Using the following condition for redirecting users to login.php is not working.
<?php
if(userid()=='') {
?>
header ('location: login.php');
Output in webpage is displayed like header ('location: login.php');
and no redirection is happening.
Sorry i am new to PHP please help me out if i am wrong.