Is a user only a safe way to protect the area?
if (! Isset ($ _ session ['username'])) {redirect (SITE_ROOT. 'St_pages / login /');}
Using:
function redirect ($ url) {header ('location:'. $ Url); Exit ('& lt; a href =' '. $ Url.' "& Gt; To redirect you: '. $ Url.' & Lt; / a & gt; ');}
Yes it is safe
Although the header () does not end anything, but Exit () actually eliminates a script; this is the only purpose of this function
Comments
Post a Comment