include - PHP including file only for admin -


my site consists of single page (or well, allmost), on top handling of post , stuff. now, have post-things solely admins. these located in separate file, include following:

if($_session['type'] == 'admin'){     include('adminhandler.php'); } 

now, in adminhandler.php check in each post or function whether type of user correct, example:

if(isset($_post['deleteuser']) && $_session['type'] == 'admin'){ /* stuff;*/ } 

now, i'm wondering if indeed necessary. there chance user can manipulate somehow include php file without having $_session['type'] of admin?

this silly question, security i'd rather take before uncertainty.

as noted marc b (see comments on question), advised second check in case should forget it.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -