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
Post a Comment