I was wondering if what I'm using is safe:
Header(“Location:”);
I want to use it like this: $user would be the user's session and 1 would mean admin. (Just an example.)
if($user != 1){
header("location: index.php"); }
So would this stop users from using that page, including downloading files, looking at the source of that page? Because my adminpanel is going to have downloads and also inserts for the homepage..
If it's not safe to use, or the way I'm using it. What should I use instead?
Thanks.